There is no breathing space because I had a deadline for periodical article.
On the rebound, I contemplated Ruby.
I suppose that I’m filled with pleasure in this time.
Python emulates OOP by being based on Function and Record,
but Ruby’s Function is an emulation based on OOP. Therefore
it’s not cool when we call lambda.
We need the ”.call”.
f = lambda{|x| p x}
f.call(12)
I wanna write it like this.
f = lambda{|x| p x}
f(12)
On this new rule,
When the name of something like function is a local variable, it apply a “call” to the variable.
What do you think?
Actually, I tried it before, but I failed for:
I used the special method “()” instead of “call”.
I tried to support that “foo.bar(12)” means “foo.bar.().call(12)”.
The new way’s fault is that a method can’t called if a local variable has a same name.
There is no matter usually, but there’s a case that it’s frequently duplicated like “p” method.
Should I prepare the way to avoid?