#lispyGopherClimate #valentinesDay Morning in Europe #peertube #live #programming #technology #podcast .
#archive https://toobnix.org/w/wzDqaQke9raTSTxVDHTemo
Oldschool versus newschool
#lisp #versus #CLOS in #commonLisp
(basically me monday morning quarterbacking myself from the Tuesday-night-in-the-americas hosted by Ramin)
I will at least try push-button running *this article* which factors into the long-delayed current log I am writing. https://screwlisp.small-web.org/software-individuals/sandewalls-sat-solver-implementation-example/ which feeds into the other topic.
<">
I mean, typecase using type specifiers makes sense, it’s a type-based operation after all. But handler-bind feels like a class- (or whatever the hierarchy of conditions are, they are not standard-objects iirc) based operation. Yet it uses type specifiers, and that’s a fun turn of events.
</">
My intuition is different.
I see this part of what `handler-bind' does merely (or at least essentially) as a kind of type dispatch (except that the primitive types are only condition types).
(Whether condition types are standard-classes is implementation-dependent, so they may or may not be such.
What is important is that the hierarchy of the kinds of conditions is integrated with the hierarchy of classes (and types).)
<">
I wish generics also allowed type specifiers. Imagine the world we’d be living in…
</">
To some degree I think we already do.
I haven't done this, so off the top of my head, I think it's possible to base method dispatch on (much of) what compound type specifiers allow by sufficiently heavy use of the Meta-Object Protocol and suitable metaclasses.
It would likely be also necessary to wrap `defmethod' in macro calls, but that is par for the course.
Whether that would be a good idea is another matter.
The complexity of the implementation would have to be justified.
Then this might reduce the efficiency of method dispatch.
(We usually don't mind when the efficiency of handling exceptional situations is less than the efficiency of "regular" execution.)
#CLOS
#CommonLisp
#CommonLispObjectSystem
#GenericDispatch
#MetaObjectProtocol
#MOP
Le film Scurry raconte une histoire d’extraterrestres https://tozounoir.zouluvo.com/le-film-scurry-raconte-une-histoire-dextraterrestres/
#film #Scurry #alien #araignée #géante #invasion #extraterrestre #tunnel #soussol #suspense #acteurs #effets #spéciaux #créature #huis #clos #sciencefiction #peur #tension #horreur #captivant #mystérieux #sombre #attaque #ville #monstre #souterrain #cinéma #ambiance #extraterrestres
Cl-gopher is a Common Lisp library that implements the server and client sides of the Gopher protocol, as well as a sample text client. An easy to understand and well designed example of using CLOS.
[AMOP]
@dougmerritt @weekend_editor @sigue @abuseofnotation @screwlisp
Right now I'm thinking that the real value of _The Art of the Metaobject Protocol_ is showing one way to do metaprogramming, and object-oriented programming is merely a demonstration domain.
Of course, what begat AMOP was a desire for an approach that can cover a large part of the OOP language design space, not just one point in that space, in order to be attractive to different schools of thought.
@dougmerritt @weekend_editor @sigue @abuseofnotation @screwlisp
> no one else has been mentioning (so far as I've noticed) "The Art of the Metaobject Protocol"
Not in this thread.
Indeed, this book is a tour de force (et de magique).
> uncertain that the topic deserved such a deep analysis
The topic—maybe, maybe not, but the book is really about the metatopic, i.e. about metaprogramming, if I may abuse this prefix.
(I know this ought to be formulated more carefully.)
@weekend_editor @sigue @dougmerritt @abuseofnotation @screwlisp
> (call-next-method) is a procedural way to do this, costing an extra function call at runtime, but obviating the need for weird compilation.
And that is the costs-of-lisp-implementation consideration.
The other one is the program design consideration (including the costs of program modification), which often leads me to prefer a declarative style, but that is my point of view, there are always tradeoffs, etc.
@weekend_editor @sigue @dougmerritt @abuseofnotation @screwlisp
P.S.
If I recall correctly, freezing a set of class and generic function definitions (including the methods) precludes some operations later, like redefining a class at run time, but I don't know if this is related to your question.
Again, don't trust me.