Google Groups Home
Help | Sign in
Why "Kernel.puts" and not "Kernel.put"?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
shadytr...@gmail.com  
View profile
 More options Apr 7 2006, 6:56 pm
Newsgroups: comp.lang.ruby
From: shadytr...@gmail.com
Date: 7 Apr 2006 15:56:48 -0700
Local: Fri, Apr 7 2006 6:56 pm
Subject: Why "Kernel.puts" and not "Kernel.put"?
It puzzles me since other methods such as "Array.fill" or
"String.slice" all use the imperative mood, the one without an "s"
attached to a verb, but "Kernel.puts" uses third-person singluar, the
one with an "s." Is there a reason behind the different naming?

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daniel Schierbeck  
View profile
 More options Apr 7 2006, 7:07 pm
Newsgroups: comp.lang.ruby
From: Daniel Schierbeck <daniel.schierb...@gmail.com>
Date: Sat, 08 Apr 2006 01:07:50 +0200
Local: Fri, Apr 7 2006 7:07 pm
Subject: Re: Why "Kernel.puts" and not "Kernel.put"?
shadytr...@gmail.com wrote:
> It puzzles me since other methods such as "Array.fill" or
> "String.slice" all use the imperative mood, the one without an "s"
> attached to a verb, but "Kernel.puts" uses third-person singluar, the
> one with an "s." Is there a reason behind the different naming?

`puts' and `gets' are not words used solely by Ruby. In fact, I think
practically all programming languages use them.

I've always thought they were abbreviations of `put string' and `get
string', respectively.

Daniel


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tim Hunter  
View profile
 More options Apr 7 2006, 7:31 pm
Newsgroups: comp.lang.ruby
From: Tim Hunter <cycli...@nc.rr.com>
Date: Fri, 07 Apr 2006 23:31:06 GMT
Local: Fri, Apr 7 2006 7:31 pm
Subject: Re: Why "Kernel.puts" and not "Kernel.put"?

I'm reasonably certain the method is named after the "puts" ("put
string") function in the standard C library. There are many methods in
Ruby that are named the same as their corresponding C or Unix function:
system, raise, fork, printf and sprintf, putc, exit, etc.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
paul.denlinger@gmail.com  
View profile
 More options Apr 7 2006, 9:25 pm
Newsgroups: comp.lang.ruby
From: "paul.denlin...@gmail.com" <paul.denlin...@gmail.com>
Date: 7 Apr 2006 18:25:55 -0700
Local: Fri, Apr 7 2006 9:25 pm
Subject: Re: Why "Kernel.puts" and not "Kernel.put"?
"puts" stands for "put string". For a detailed explanation, please go
to http://pine.fm/LearnToProgram/?Chapter=04

Paul Denlinger


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
shadytrees@gmail.com  
View profile
 More options Apr 8 2006, 9:42 am
Newsgroups: comp.lang.ruby
From: "shadytr...@gmail.com" <shadytr...@gmail.com>
Date: 8 Apr 2006 06:42:18 -0700
Local: Sat, Apr 8 2006 9:42 am
Subject: Re: Why "Kernel.puts" and not "Kernel.put"?
Awesome. Thanks.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google