what is this def?
it is not a method…?
it is not some sugar…?
well might it be a lambda…?
just what is this def?
(funny we say def for define but not init for initialize)
-t0
what is this def?
it is not a method…?
it is not some sugar…?
well might it be a lambda…?
just what is this def?
(funny we say def for define but not init for initialize)
-t0
T. Onoma wrote:
what is this def?
it is not a method…?
it is not some sugar…?
well might it be a lambda…?
just what is this def?(funny we say def for define but not init for initialize)
-t0
It is a special form. Or, to paraphrase the Gateless Gate,
A monk asked Nansen: `Is there a teaching no master ever preached before?’
Nansen said: `Yes, there is.’
`What is it?’ asked the monk.
Nansen replied: `It is not a method, it is not some sugar, it is not
lambda.’
A keyword
No.
Sort of. (But you could say that pretty much everything in modern
languages is sugar).
No.
On Sat, 15 Nov 2003, T. Onoma wrote:
See above.
Not really.
what is this def?
it is not a method…?
it is not some sugar…?
well might it be a lambda…?
just what is this def?
a keyword?
well, btw it is also sugar fore define_method()
(funny we say def for define but not init for initialize)
I would have loved init
sidenote: what about that old thread about making def return something
useful ? (I remember that an UnboundMethod was refused, but what about
a Symbol? )
il Sat, 15 Nov 2003 20:11:13 +0900, “T. Onoma” transami@runbox.com ha scritto::
Hi!
On Sat, 15 Nov 2003, T. Onoma wrote:
it is not a method…?
No.
Just for clarification: That is “no” as in “No, it really isn’t”, not
“no” as in “No, that is wrong” (which it to my knowledge would mean
in Japanese).
.-------.
message > 100 kB? / | |
sender = spammer? / | R.I.P.|
text = spam? / | |
gabriele renzi wrote:
I would have loved init
I’m thinking that Ruby should accept any method that is a one-character
misspelling of initialize as an initializer. Perhaps I’ll write an RCR.
“Beware of bugs in the above code; I have only proved it correct,
not tried it.” – Donald Knuth (in a memo to Peter van Emde Boas)