method versus method!

F

Fred Werne

Hi

Why isn't the name of the Array-method delete_at delete_at! ?

The method changes the object, doesn't it?

Fred from Wuppertal, Germany
 
D

daz

Fred Werne said:
Hi

Why isn't the name of the Array-method delete_at delete_at! ?

The method changes the object, doesn't it?

Fred from Wuppertal, Germany


There are others like this, too.

The naming-convention seems to be that a (! "bang") method exists
only if there is a corresponding (non-bang) method which doesn't
modify the receiver.


daz
 

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

No members online now.

Forum statistics

Threads
474,137
Messages
2,570,797
Members
47,342
Latest member
eixataze

Latest Threads

Top