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


Groups > comp.lang.ruby > #3179

Re: Telnet "More?"

X-FeedAbuse http://nntpfeed.proxad.net/abuse.pl feeded by 88.191.16.109
Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!nntpfeed.proxad.net!nospam.fr.eu.org!talisker.lacave.net!lacave.net!not-for-mail
From 7stud -- <bbxx789_05ss@yahoo.com>
Newsgroups comp.lang.ruby
Subject Re: Telnet "More?"
Date Tue, 19 Apr 2011 12:21:38 -0500
Organization Service de news de lacave.net
Lines 36
Message-ID <7d2f1e2e2a48773ca3137c3e39cbc5d7@ruby-forum.com> (permalink)
References <0bc1be8ec871e5fbad7753c695247ddc@ruby-forum.com> <4c00eb93cb86eea75501e223526dc08b@ruby-forum.com> <9ad7422f9e7881a37eb06b255a50f31e@ruby-forum.com>
NNTP-Posting-Host bristol.highgroove.com
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 7bit
X-Trace talisker.lacave.net 1303233955 45523 65.111.164.187 (19 Apr 2011 17:25:55 GMT)
X-Complaints-To abuse@lacave.net
NNTP-Posting-Date Tue, 19 Apr 2011 17:25:55 +0000 (UTC)
In-Reply-To <9ad7422f9e7881a37eb06b255a50f31e@ruby-forum.com>
X-Received-From This message has been automatically forwarded from the ruby-talk mailing list by a gateway at comp.lang.ruby. If it is SPAM, it did not originate at comp.lang.ruby. Please report the original sender, and not us. Thanks! For more details about this gateway, please visit: http://blog.grayproductions.net/categories/the_gateway
X-Mail-Count 381862
X-Ml-Name ruby-talk
X-Rubymirror Yes
X-Ruby-Talk <7d2f1e2e2a48773ca3137c3e39cbc5d7@ruby-forum.com>
Xref x330-a1.tempe.blueboxinc.net comp.lang.ruby:3179

Show key headers only | View raw


Eric T. wrote in post #993412:
> 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,

Ahh, I see.

> but as Christopher
> explained, print is actually a *method* (not obvious if you don't know
> Ruby),

print() is a method in python3 as well.

> so it makes more sense that a closure is required.
>
> In Lua, for instance, print is a global function,

print() acts like a global function in ruby.  Kernel is "mixed into" the 
Object class, from which all objects inherit, which means any object can 
call the methods defined in Kernel.  And because the methods defined in 
Kernel are private, you cannot specify a receiver when calling the 
methods, and therefore calling a Kernel method looks like calling a 
global method in any other language.


> or if it *is* static that you can't just pass it as-is
> to anything that requires a callable.

In ruby, the name of a method is not a reference to the method.  Rather, 
the name of the method serves as a method call with no arguments.

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