Clojure Protocols & expression problem
retard
re at tard.com.invalid
Wed Apr 28 16:53:55 PDT 2010
Wed, 28 Apr 2010 18:34:44 -0500, Andrei Alexandrescu wrote:
> On 04/28/2010 06:28 PM, retard wrote:
>> Wed, 28 Apr 2010 13:22:53 -0400, bearophile wrote:
>>
>>> BCS:
>>>
>>>> Could you elaborate on what exactly the expression problem is?<
>>>
>>> I am far from being an expert on such matters, I will do what I can to
>>> answer. It's not an esoteric problem, if you program with an OO
>>> language you have probably faced it sometime.
>>
>> You failed to mention that the OOP solution is in many cases overly
>> complex. When you don't need to subclass the car elements, a functional
>> pattern matching happens to win - at least if the declarativeness of
>> code matters. The implementation can also use jump tables so it becomes
>> faster than double dispatch. Luckily D is never going to get algebraic
>> data types so you can all stop reading this post right here.
>
> I'm having trouble picturing the following scenario for a day in life.
>
> [snipped a very precise description of someone's life]
>
> One of these things is unlike the others!
>
>
> Andrei
:) Sorry, but I actually have to use D. We long ago started some D
projects and have to maintain them now (ok, this sounds worse than it
really is - it's a joy compared to the xml bloat of j2ee and terribly bad
design of php!). I also often fire up dmd to test some more or less
trivial piece of code since I need the native codegen capabilities of the
language so I really do have use for it. So, tyvm for the work so far, it
has been really useful.
I also try to keep the amount of factual information on my posts above
the level of bitterness. (I should probably refrain from posting at all
if it annoys too much.) After all, there might be some hope that it
educates the community as a large and puts some pressure on you to stop
breaking the principles of good language design. Fwiw, it would calm some
of the most demanding users of the language if there was a well
documented process behind design decisions. I haven't heard any good
arguments e.g. against algebraic data types other than "it confuses some
novice C users".
More information about the Digitalmars-d
mailing list