Re: Clojure Protocols & expression problem

2010-04-29 Thread Walter Bright
retard wrote: I wonder what is causing all this. Have you started to consider everyone with knowledge about programming languages a threat? There are several ideas posted here a day, far more than could ever be implemented in D, or even that could be thoroughly and fairly discussed by one per

Re: Clojure Protocols & expression problem

2010-04-29 Thread retard
Thu, 29 Apr 2010 15:34:15 -0500, Ellery Newcomer wrote: > Walter, you shouldn't be apologizing to retard. These personal attacks > are just not acceptable on a public forum and coming from an adult. > > Instead, I think you should be more like him. I think this whole thing is seriously getting o

Re: Clojure Protocols & expression problem

2010-04-29 Thread Ellery Newcomer
Walter, you shouldn't be apologizing to retard. These personal attacks are just not acceptable on a public forum and coming from an adult. Instead, I think you should be more like him. On 04/29/2010 03:25 PM, retard wrote: Thu, 29 Apr 2010 10:21:15 -0700, Walter Bright wrote: I'm sorry yo

Re: Clojure Protocols & expression problem

2010-04-29 Thread retard
Thu, 29 Apr 2010 10:21:15 -0700, Walter Bright wrote: > retard wrote: >> :) Sorry, but I actually have to use D. > > I'm sorry you'd have to use D if you don't want to, but it is a positive > sign that D is catching on in the business world. It's positive that you sometimes write a reply. What s

Re: Clojure Protocols & expression problem

2010-04-29 Thread Walter Bright
retard wrote: :) Sorry, but I actually have to use D. I'm sorry you'd have to use D if you don't want to, but it is a positive sign that D is catching on in the business world.

Re: Clojure Protocols & expression problem

2010-04-29 Thread Andrei Alexandrescu
On 04/29/2010 04:16 AM, bearophile wrote: Michel Fortin: is a much easier concept to grasp than double dispatch.< It's not hard to think about double dispatch, you can see it like a special case of function overload, where the language somehow allows you to overload on the base of the dynam

Re: Clojure Protocols & expression problem

2010-04-29 Thread bearophile
Michel Fortin: >is a much easier concept to grasp than double dispatch.< It's not hard to think about double dispatch, you can see it like a special case of function overload, where the language somehow allows you to overload on the base of the dynamic type of two objects. Things gets less easy

Re: Clojure Protocols & expression problem

2010-04-29 Thread Don
bearophile wrote: A short video about Clojure 1.2 Protocols, created to solve the expression problem (that D doesn't solve well yet), they are like fake multimetods because they are like single dispatch :-) (So they need just a virtual table, that the JavaVM can optimize well): http://vimeo.c

Re: Clojure Protocols & expression problem

2010-04-28 Thread Michel Fortin
On 2010-04-28 21:39:41 -0400, bearophile said: Andrei Alexandrescu: Good question. Statistically, I'd say very few people are interested in double dispatch. I see. I'd like to know what CLOS (CLisp) users too think about this. (Generally if a feature become syntactically clean and nice, an

Re: Clojure Protocols & expression problem

2010-04-28 Thread bearophile
Andrei Alexandrescu: > Good question. Statistically, I'd say very few people are interested in > double dispatch. I see. I'd like to know what CLOS (CLisp) users too think about this. (Generally if a feature become syntactically clean and nice, and it's written in the manual, surely more peopl

Re: Clojure Protocols & expression problem

2010-04-28 Thread Andrei Alexandrescu
On 04/28/2010 07:38 PM, bearophile wrote: Andrei Alexandrescu: I'm having trouble picturing the following scenario for a day in life. After your experience with Loki, what do you think about double dispatch in external functions in D3? Good question. Statistically, I'd say very few people ar

Re: Clojure Protocols & expression problem

2010-04-28 Thread bearophile
Andrei Alexandrescu: > I'm having trouble picturing the following scenario for a day in life. After your experience with Loki, what do you think about double dispatch in external functions in D3? Bye, bearophile

Re: Clojure Protocols & expression problem

2010-04-28 Thread retard
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 wi

Re: Clojure Protocols & expression problem

2010-04-28 Thread Andrei Alexandrescu
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 O

Re: Clojure Protocols & expression problem

2010-04-28 Thread retard
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

Re: Clojure Protocols & expression problem

2010-04-28 Thread bearophile
Lutger: >I would love to never see a visitor pattern again, it really sucks compared to >multimethods.< You are probably more qualified than me to answer the original question by BCS :-) Multimethods are easy to use and understand (if you don't mix them with too many other things). >I think

Re: Clojure Protocols & expression problem

2010-04-28 Thread Lutger
bearophile wrote: > According to the paper from Bjarne Stroustrup: > http://www.research.att.com/~bs/multimethods.pdf > > this is a possible syntax D3 can use for the double dispatch: > void foo(@virtual A a, @virtual B b) {} > > Bye, > bearophile I have studied this paper a bit once, it's good

Re: Clojure Protocols & expression problem

2010-04-28 Thread Ellery Newcomer
On 04/28/2010 01:15 PM, Lutger wrote: retard wrote: Wed, 28 Apr 2010 16:44:07 +, BCS wrote: Hello bearophile, By the way, you can see an example of the expression problem here, Could you elaborate on what exactly the expression problem is? Learning the use of a search engine would

Re: Clojure Protocols & expression problem

2010-04-28 Thread bearophile
According to the paper from Bjarne Stroustrup: http://www.research.att.com/~bs/multimethods.pdf this is a possible syntax D3 can use for the double dispatch: void foo(@virtual A a, @virtual B b) {} Bye, bearophile

Re: Clojure Protocols & expression problem

2010-04-28 Thread Lutger
retard wrote: > Wed, 28 Apr 2010 16:44:07 +, BCS wrote: > >> Hello bearophile, >> >> >>> By the way, you can see an example of the expression problem here, >> >> Could you elaborate on what exactly the expression problem is? > > Learning the use of a search engine would help you greatly i

Re: Clojure Protocols & expression problem

2010-04-28 Thread retard
Wed, 28 Apr 2010 16:44:07 +, BCS wrote: > Hello bearophile, > > >> By the way, you can see an example of the expression problem here, > > Could you elaborate on what exactly the expression problem is? Learning the use of a search engine would help you greatly in your life: => http://www.g

Re: Clojure Protocols & expression problem

2010-04-28 Thread bearophile
Maybe it's better if I actually give a bit of answer too to your question. If you take a look at my D code, you can see there are many kinds of car parts, and two different kind of "visits" of them, that perform different operations on them. The problem is, what does it happen in the code if I

Re: Clojure Protocols & expression problem

2010-04-28 Thread bearophile
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. I think it's one of the two most important O

Re: Clojure Protocols & expression problem

2010-04-28 Thread BCS
Hello bearophile, By the way, you can see an example of the expression problem here, Could you elaborate on what exactly the expression problem is? -- ... <

Clojure Protocols & expression problem

2010-04-28 Thread bearophile
A short video about Clojure 1.2 Protocols, created to solve the expression problem (that D doesn't solve well yet), they are like fake multimetods because they are like single dispatch :-) (So they need just a virtual table, that the JavaVM can optimize well): http://vimeo.com/11236603 By the