guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A couple of questions about goops method parameters


From: Carlos Pita
Subject: Re: A couple of questions about goops method parameters
Date: Fri, 05 Sep 2014 09:47:50 -0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.93 (gnu/linux)

Hi Nala,

> IMO, when you have lambda*, you never need define-method. Actually, I
> want to say, once you have such FP features, you don't need OOP
> anymore.

I really don't see classes and multimethods a la CLOS competing against
FP features. They are about certain ways of composing structures and
providing common functional interfaces to them (and so, about certain
ways of dispatching function calls). They don't promote mutability. They
don't promote packaging data and methods in rigid ways. They just
capture a pattern that would be cumbersome to implement by hand each
time (even with the help of metaprogramming).

I don't care about "everything is an object" stuff, but I do care about
using the right tool for the problem at hand, and it feels good when the
problem is a frequent one and the tool already exists.

> You can mix them while programming, but you don't have to.  Anyway, if
>you try to avoid to use GOOPS someday, you have to handle dispatching
>by yourself. ;-)

You see. There could be cases for which goops dispatching were not good
enough, I can't say it for sure. But multimethods are an incredible
flexible mechanism and you still have the mop to tweak, so I will write
my own dispatching code and "meta-code" only as a last LAST resource.

Best regards
--
Carlos




reply via email to

[Prev in Thread] Current Thread [Next in Thread]