Re: Duck typing alows true polymorfisim

2006-09-01 Thread Isaac Gouy
The Ghost In The Machine wrote: > In comp.lang.java.advocacy, Tor Iver Wilhelmsen > <[EMAIL PROTECTED]> > wrote > on 31 Aug 2006 18:31:15 +0200 > <[EMAIL PROTECTED]>: > > The Ghost In The Machine <[EMAIL PROTECTED]> writes: > > > >> Also, one language is very conspicuous by its absence: C#. > > >

Re: Duck typing alows true polymorfisim

2006-08-31 Thread fizbin
Just a quick note in the midst of this: The Ghost In The Machine wrote: > Dynamic type creation. I don't know if Java has this or not. > One can of course attempt bytecode synthesis -- I think that's > what BCEL uses -- but that's a bit of a hack. Since no one has pointed this out, I should ment

Re: Duck typing alows true polymorfisim

2006-08-31 Thread The Ghost In The Machine
In comp.lang.java.advocacy, Tor Iver Wilhelmsen <[EMAIL PROTECTED]> wrote on 31 Aug 2006 18:31:15 +0200 <[EMAIL PROTECTED]>: > The Ghost In The Machine <[EMAIL PROTECTED]> writes: > >> Also, one language is very conspicuous by its absence: C#. > > He does not date any of the updates, so it's uncle

Re: Duck typing alows true polymorfisim

2006-08-31 Thread Tor Iver Wilhelmsen
The Ghost In The Machine <[EMAIL PROTECTED]> writes: > Also, one language is very conspicuous by its absence: C#. He does not date any of the updates, so it's unclear how recently it has been updated (a lot of the web is stale, like a rotting tree in a forest.) > AmigaBasic -- Microsoft-sponsore

Re: Duck typing alows true polymorfisim

2006-08-30 Thread The Ghost In The Machine
In comp.lang.java.advocacy, Jeroen Wenting wrote on Wed, 30 Aug 2006 20:18:52 +0200 <[EMAIL PROTECTED]>: > > "Simon Forman" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> [EMAIL PROTECTED] wrote: >>> lets say you want a generic numerical algorithom like sum >>> > >> What's your

Re: Duck typing alows true polymorfisim

2006-08-30 Thread Jeroen Wenting
"Simon Forman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > [EMAIL PROTECTED] wrote: >> lets say you want a generic numerical algorithom like sum >> > What's your question? (Or, if no question, point?) :-) > Reads like the weekly "Ruby is better than Java because X" post.

Re: Duck typing alows true polymorfisim

2006-08-26 Thread David Ells
Terry Reedy wrote: > "David Ells" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > def increment(x): > >return x += 1 > > 'return x+1' works better ;-) > > tjr Heh, woops... thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Duck typing alows true polymorfisim

2006-08-26 Thread Dan Johnson
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > lets say you want a generic numerical algorithom like sum > > Ruby > > def sum lst > lst.inject(0){|total,current| total*current} > end > > Java // i dont know if there is a numeric super class for numbers [snip- int only example] Th

Re: Duck typing alows true polymorfisim

2006-08-25 Thread The Ghost In The Machine
In comp.lang.java.advocacy, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote on 25 Aug 2006 12:05:21 -0700 <[EMAIL PROTECTED]>: > lets say you want a generic numerical algorithom like sum > > Ruby > > def sum lst > lst.inject(0){|total,current| total*current} > end > > Java // i dont know if there is

Re: Duck typing alows true polymorfisim

2006-08-25 Thread Terry Reedy
"David Ells" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > def increment(x): >return x += 1 'return x+1' works better ;-) tjr -- http://mail.python.org/mailman/listinfo/python-list

Re: Duck typing alows true polymorfisim

2006-08-25 Thread Simon Forman
[EMAIL PROTECTED] wrote: > What was i thinkinng repace * with + i was'nt thinking i origanaly > thaught of sum of squares so i put a * insted of a + But again, what's your question? -- http://mail.python.org/mailman/listinfo/python-list

Re: Duck typing alows true polymorfisim

2006-08-25 Thread atbusbook
What was i thinkinng repace * with + i was'nt thinking i origanaly thaught of sum of squares so i put a * insted of a + -- http://mail.python.org/mailman/listinfo/python-list

Re: Duck typing alows true polymorfisim

2006-08-25 Thread David Ells
[EMAIL PROTECTED] wrote: > lets say you want a generic numerical algorithom like sum > > Ruby > > def sum lst > lst.inject(0){|total,current| total*current} > end > > Java // i dont know if there is a numeric super class for numbers > > class Sum{ > public static int sum(int[] lst){ > int

Re: Duck typing alows true polymorfisim

2006-08-25 Thread John Bokma
[EMAIL PROTECTED] wrote: > lets say you want a generic numerical algorithom like sum Hmmm, I thought you were going to announce that you were the first born son of Xah Lee. Actually you did! -- John MexIT: http://johnbokma.com/mexit/ per

Re: Duck typing alows true polymorfisim

2006-08-25 Thread Simon Forman
[EMAIL PROTECTED] wrote: > lets say you want a generic numerical algorithom like sum > > Ruby > > def sum lst > lst.inject(0){|total,current| total*current} > end > > Java // i dont know if there is a numeric super class for numbers > > class Sum{ > public static int sum(int[] lst){ > int t

Duck typing alows true polymorfisim

2006-08-25 Thread atbusbook
lets say you want a generic numerical algorithom like sum Ruby def sum lst lst.inject(0){|total,current| total*current} end Java // i dont know if there is a numeric super class for numbers class Sum{ public static int sum(int[] lst){ int total = 0; for(int current : lst){ tot