Re: Telnet "More?"
- From: "Eric T." <erictetz@xxxxxxxxx>
- Date: Sun, 17 Apr 2011 19:48:01 -0500
7stud -- wrote in post #993403:
Yes, that would be pointless, but where does such a function appear in
That would be (I thought) the 'out' lambda, but as Christopher
explained, print is actually a *method* (not obvious if you don't know
Ruby), so it makes more sense that a closure is required.
In Lua, for instance, print is a global function, so making a closure
'function out(...) print(...) end' would be utterly superfluous;
anything you could pass 'out' to you could just pass 'print' to.
It still strikes me odd that Kernel#print is not static (does it modify
Kernel state?), or if it *is* static that you can't just pass it as-is
to anything that requires a callable.
Posted via http://www.ruby-forum.com/.
- Prev by Date: Re: Undefine Method Only Marks the Method Undefined
- Next by Date: Re: Telnet "More?"
- Previous by thread: Re: Telnet "More?"
- Next by thread: Re: Telnet "More?"