Re: Finding the applicable methods...
"David McClain (as dbm at refined-audiometrics dot com)" <[email protected]> Wed, 15 Jul 2026 09:00:30 -0700
| Newsgroups | gmane.lisp.lispworks.general |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail=_10BDBEAF-5962-49DE-AA6D-3B577D803E21 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Sadly, in one fairly large effort, with a half-dozen Lisp programmers, I = ran into that same difficulty on the use of Bignums as crypto values.=20 The data items were constantly being mis-used. So I had to wrap each of = them with a type specific Struct - each with only one slot. But that = helped all of us stay on the same page. Any single person writing Lisp can easily keep track and use just bare = vectors or conses. But that isn=E2=80=99t easily handled properly with a = half dozen people all misunderstanding from different angles. > On Jul 15, 2026, at 07:37, Tim Bradshaw <[email protected]> wrote: >=20 > On 14 Jul 2026, at 23:08, David McClain (as dbm at = refined-audiometrics dot com) <[email protected]> wrote: >>=20 >> Yes, you are right=E2=80=A6 I reluctantly surrendered to the typed = STRUCT, aka without (:TYPE VECTOR).=20 >>=20 >> That gives me the chance to use the LW Inspect to show multiple = different views of a RB-TREE, including a nice graphical view, thanks to = the LW GRAPH pane. >=20 > To beat a dead horse, this is my problem with CLOS. >=20 > I have lots of cases where I started off using, say, a cons for some = object with two fields (with named accessors defined the obvious way). = And at some point I'm trying to debug it and I can't even tell if the = conses I'm looking at are the ones I think they are. So I use = structures, and now I can see what the objects are, I don't need to = define accessors by hand, and I can do things like controlilng printing = so I don't have to have *print-circle* on all the time. Not to mention = all the methody / typecase goodness. And may be it's slower but it's = hard to measure. >=20 > So I think, "I know, I'll use defclass not defstruct for even more = methody goodness". And now my program is suddenly entirely dominated by = slot access overhead in any implementation. >=20 > CLOS (in particular subclasses of standard-object) is to CL what = Python is to numerical programming: it's great and all, but you don't = want it anywhere near your inner loops. I hate Python for that. >=20 > --tim --Apple-Mail=_10BDBEAF-5962-49DE-AA6D-3B577D803E21 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html aria-label=3D"message body"><head><meta http-equiv=3D"content-type" = content=3D"text/html; charset=3Dutf-8"></head><body = style=3D"overflow-wrap: break-word; -webkit-nbsp-mode: space; = line-break: after-white-space;">Sadly, in one fairly large effort, with = a half-dozen Lisp programmers, I ran into that same difficulty on the = use of Bignums as crypto values. <div><br></div><div>The data items = were constantly being mis-used. So I had to wrap each of them with a = type specific Struct - each with only one slot. But that helped all of = us stay on the same page.<div><br></div><div>Any single person writing = Lisp can easily keep track and use just bare vectors or conses. But that = isn=E2=80=99t easily handled properly with a half dozen people all = misunderstanding from different angles.</div><div><br></div><div><br = id=3D"lineBreakAtBeginningOfMessage"><div><br><blockquote = type=3D"cite"><div>On Jul 15, 2026, at 07:37, Tim Bradshaw = <[email protected]> wrote:</div><br = class=3D"Apple-interchange-newline"><div><meta http-equiv=3D"content-type"= content=3D"text/html; charset=3Dutf-8"><div style=3D"overflow-wrap: = break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">On = 14 Jul 2026, at 23:08, David McClain (as dbm at refined-audiometrics dot = com) <[email protected]> wrote:<br><div><blockquote = type=3D"cite"><br class=3D"Apple-interchange-newline"><div><meta = charset=3D"UTF-8"><span style=3D"caret-color: rgb(0, 0, 0); font-family: = Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: = normal; font-weight: 400; letter-spacing: normal; orphans: 2; = text-align: start; text-indent: 0px; text-transform: none; white-space: = normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; = text-decoration: none; float: none; display: inline !important;">Yes, = you are right=E2=80=A6 I reluctantly surrendered to the typed STRUCT, = aka without (:TYPE VECTOR).<span = class=3D"Apple-converted-space"> </span></span><br = style=3D"caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; = font-size: 11px; font-style: normal; font-variant-caps: normal; = font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; = text-indent: 0px; text-transform: none; white-space: normal; widows: 2; = word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-line: = none; text-decoration-thickness: auto; text-decoration-style: = solid;"><br style=3D"caret-color: rgb(0, 0, 0); font-family: = Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: = normal; font-weight: 400; letter-spacing: normal; orphans: 2; = text-align: start; text-indent: 0px; text-transform: none; white-space: = normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; = text-decoration-line: none; text-decoration-thickness: auto; = text-decoration-style: solid;"><span style=3D"caret-color: rgb(0, 0, 0); = font-family: Menlo-Regular; font-size: 11px; font-style: normal; = font-variant-caps: normal; font-weight: 400; letter-spacing: normal; = orphans: 2; text-align: start; text-indent: 0px; text-transform: none; = white-space: normal; widows: 2; word-spacing: 0px; = -webkit-text-stroke-width: 0px; text-decoration: none; float: none; = display: inline !important;">That gives me the chance to use the LW = Inspect to show multiple different views of a RB-TREE, including a nice = graphical view, thanks to the LW GRAPH = pane.</span></div></blockquote><br></div><div>To beat a dead horse, this = is my problem with CLOS.</div><div><br></div><div>I have lots of cases = where I started off using, say, a cons for some object with two fields = (with named accessors defined the obvious way). And at some point = I'm trying to debug it and I can't even tell if the conses I'm looking = at are the ones I think they are. So I use structures, and now I = can see what the objects are, I don't need to define accessors by hand, = and I can do things like controlilng printing so I don't have to have = *print-circle* on all the time. Not to mention all the methody / = typecase goodness. And may be it's slower but it's hard to = measure.</div><div><br></div><div>So I think, "I know, I'll use defclass = not defstruct for even more methody goodness". And now my program = is suddenly entirely dominated by slot access overhead in any = implementation.</div><div><br></div><div>CLOS (in particular subclasses = of standard-object) is to CL what Python is to numerical programming: = it's great and all, but you don't want it anywhere near your inner = loops. I hate Python for = that.</div><div><br></div><div>--tim</div></div></div></blockquote></div><= br></div></div></body></html>= --Apple-Mail=_10BDBEAF-5962-49DE-AA6D-3B577D803E21-- _______________________________________________ Lisp Hug - the mailing list for LispWorks users [email protected] http://www.lispworks.com/support/lisp-hug.html