Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #3076

Re: Telnet "More?"

From "Eric T." <erictetz@gmail.com>
Newsgroups comp.lang.ruby
Subject Re: Telnet "More?"
Date 2011-04-17 19:48 -0500
Organization Service de news de lacave.net
Message-ID <9ad7422f9e7881a37eb06b255a50f31e@ruby-forum.com> (permalink)
References <0bc1be8ec871e5fbad7753c695247ddc@ruby-forum.com> <4c00eb93cb86eea75501e223526dc08b@ruby-forum.com>

Show all headers | View raw


7stud -- wrote in post #993403:
> Yes, that would be pointless, but where does such a function appear in
> your code?

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/.

Back to comp.lang.ruby | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Telnet "More?" "Eric T." <erictetz@gmail.com> - 2011-04-17 02:10 -0500
  Re: Telnet "More?" Christopher Dicely <cmdicely@gmail.com> - 2011-04-17 09:56 -0500
    Re: Telnet "More?" "Eric T." <erictetz@gmail.com> - 2011-04-17 20:00 -0500
  Re: Telnet "More?" 7stud -- <bbxx789_05ss@yahoo.com> - 2011-04-17 17:47 -0500
    Re: Telnet "More?" "Eric T." <erictetz@gmail.com> - 2011-04-17 19:48 -0500
      Re: Telnet "More?" Christopher Dicely <cmdicely@gmail.com> - 2011-04-18 00:37 -0500
      Re: Telnet "More?" 7stud -- <bbxx789_05ss@yahoo.com> - 2011-04-19 12:21 -0500
  Re: Telnet "More?" "mouser" <invalid@invalid.com> - 2011-04-18 04:18 +0000
    Re: Telnet "More?" "mouser" <invalid@invalid.com> - 2011-04-18 04:22 +0000
  Re: Telnet "More?" Brian Candler <b.candler@pobox.com> - 2011-04-19 04:18 -0500
    Re: Telnet "More?" "mouser" <invalid@invalid.com> - 2011-04-19 16:36 +0000
      Re: Telnet "More?" Markus Fischer <markus@fischer.name> - 2011-04-19 12:12 -0500

csiph-web