a thoughtful web.
Good ideas and conversation. No ads, no tracking.   Login or Take a Tour!
comment
user-inactivated  ·  4232 days ago  ·  link  ·    ·  parent  ·  post: In which ESR shows he has programming chops after all

I'm curious what problem he had translating his Python classes to CLOS. All I can guess is the method resolution order differing, but a straightforward translation from Python would only use a non-t specifier for the first argument of generic functions, and then I don't think the MRO should ever differ. At any rate, it's easy enough to just give the ordering you want.

Maybe he just didn't want to declare his slots? I guess I can see that, but it seems like a very minor complaint.

EDIT: reading the comment thread, his complaints are:

* style warnings from the compiler. The sbcl compiler is pretty verbose, but it usually offers good advice

* " I dislike the requirement that all methods be globally exposed. too." I assume he means he wants something like private methods? Python doesn't have any such thing either, just name mangling with _, but he could have either

       (labels ((helper-1 (...) ...) (helper-2 (...) ...) ...)
          (defgeneric ....)
          (defgeneric ....))
if he had helper functions he didn't want to expose, or defined a package and not exported generics not part of his public interface if he needed actual generic functions but didn't want to expose them.

* He doesn't know how CL pretty-printing works, and didn't know how to find out.

* He thinks special variables are globals, though he does understand dynamic scope from elisp.

I think he expected to master CL as quickly as Python or Perl, and that's not going to happen. He really wants a scripting language with a nice compiler and a conventional object system, and CL is not that language. Jazzor Biglooare closer to what he wants, I think.

(Hey, mk, every time I update this post the space between the close-paren on the links and the next word gets replaced by an extra close-paren.)