techhub.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A hub primarily for passionate technologists, but everyone is welcome

Administered by:

Server stats:

4.8K
active users

#clos

0 posts0 participants0 posts today
Replied in thread

[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.

#AMOP
#CLOS
#CommonLisp

Replied in thread

@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.)

#AMOP
#CLOS
#CommonLisp

Replied in thread

@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.

#CLOS
#CommonLisp

Replied in thread

@weekend_editor @sigue @dougmerritt @abuseofnotation @screwlisp

> a CLOS equivalent to (compile-flavor-methods), that compiles all those combined methods so they don't have to be done at load or run time?

Not in the (full¹) CLOS specification.
Speaking from uncertain memory, check it if it's important.
_________
¹ Including the parts not in the ANSI standard.

I have a very vague and insufficient memory of a non-Flavors implementation that provides something like that.

#CLOS
#CommonLisp

Replied in thread

@sigue @dougmerritt @abuseofnotation @screwlisp

<">
I think the core feature is call-next-method, which can effectively be used to simulate around/before/after? (Not 100% sure it's an exact match.)
</">

Rather, the "before/after/around" approach is declarative, the `call-next-method' approach is procedural.
I can't recall a citation; I think this is even stated in the specification.

I'm afraid I'll leave a comparative analysis of the two approaches for another day 🙂.

#CLOS
#CommonLisp

Replied in thread

@dougmerritt @abuseofnotation @screwlisp @sigue

> since it came up, how many CLOS features do you need?

You are right to ask.
Off the top of my head, I've needed
multiple inheritance,
multiple dispatch,
"before" and "after" methods.
Maybe I did something with method combination once or twice, but let's not count this if I can't recall properly.
But I am not a serious ("heavy-duty") #CLOS user.

If this counts, in other languages I have missed capabilities to customize object initialization.