[Top][All Lists]

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

Re: Generators (iterators) for Gnu Emacs

From: Daniel Colascione
Subject: Re: Generators (iterators) for Gnu Emacs
Date: Sun, 07 Dec 2014 13:32:48 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0

On 12/07/2014 01:17 PM, Stefan Monnier wrote:
>> So agree to add some more core things to make the problem easier.
> I think I'd be willing to add Objects, indeed.  At least the
> completion-tables scream "make me an object".

We *have* objects. Nothing is stopping you from using EIEIO for
completion tables. But I don't think you're talking about polymorphism
and encapsulation here: ITYM that we can solve the global namespace
problem by attacking the "global" part instead of the "namespace" part.
If we have your "Objects", many functions would be instead methods (or
messages or whatever terminology you want to choose) that have meaning
only in relation to one or more of the values acted upon by these
functions, without global names of their own.

That's a terrible idea. It makes it much harder to reason about the
correct operation of programs, since now it makes it virtually
impossible to implement find-definition functionality without lots of
type inference. There's also the runtime overhead of dynamic dispatch.
Using "Objects" doesn't even solve the problem it sets out to solve,
since you still need elaborately-mangled global names for the types of
the objects themselves.

Common Lisp solved this problem 20 years ago with namespaces. We should
just implement CL namespaces instead of trying to shoehorn Smalltalk
into the language. Would you accept a CL packages implementation?

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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