Why "Kernel.puts" and not "Kernel.put"?

S

shadytrees

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

Daniel Schierbeck

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top