Robert Klemme
3/21/2008 8:38:00 AM
On 20.03.2008 21:48, Todd Benson wrote:
> On Thu, Mar 20, 2008 at 12:29 PM, Robert Klemme
> <shortcutter@googlemail.com> wrote:
>> On 20.03.2008 11:49, Todd Benson wrote:
>> > On Thu, Mar 20, 2008 at 4:44 AM, Pat Kiatchaipipat <hb.pat87@hotmail.com> wrote:
>> >> str= "ABCDE"
>> >> arr = Array.new
>> >
>> > You really don't need to declare your type. The arr = Array.new
>> > statement is unnecessary.
>>
>> Sorry to be nitpicky, this is in no way a type declaration. It is just
>> a superfluous object creation and assignment.
>
> Okay, "the instantiation of the Array object is unnecessary". From
> some newbies, I've seen them pull this type of code practice from
> fortran, pascal, c, etc... so I used the phrase "declare your type".
I can see where that comes from and I did not want to disregard the
point you were trying to make. I just thought it a bit unfortunate that
your wording kind of encourages the practice by insinuating that there
is indeed something like a variable type declaration in Ruby. :-)
Cheers
robert