P
Peter v. N.
Hi all,
I'm a Ruby noob so please forgive me...
I know there exist "simple" ways (Google's thy friend)
to create md arrays with Ruby. But it's somehow cumbersome
and it would be nice if it could be done like "array = Array.new(3,3)"
-> I know too that this means not the same in Ruby...
What I like to know: what led to the decission to do it that way
and not like it is done in the C/C++ (Java) languages à la
"int[][] arr = new int[3][3]"?
Maybe because this approach is not strictly oo-oriented? But then,
switches and loops in Ruby are neither.
It's just the devil inside who likes to know about the philosophy
about the "why it is done like that" and I'm not bitching about
Ruby (by no means).
Thank you for a pointer or a short explanation.
Greetings,
Peter
I'm a Ruby noob so please forgive me...
I know there exist "simple" ways (Google's thy friend)
to create md arrays with Ruby. But it's somehow cumbersome
and it would be nice if it could be done like "array = Array.new(3,3)"
-> I know too that this means not the same in Ruby...
What I like to know: what led to the decission to do it that way
and not like it is done in the C/C++ (Java) languages à la
"int[][] arr = new int[3][3]"?
Maybe because this approach is not strictly oo-oriented? But then,
switches and loops in Ruby are neither.
It's just the devil inside who likes to know about the philosophy
about the "why it is done like that" and I'm not bitching about
Ruby (by no means).
Thank you for a pointer or a short explanation.
Greetings,
Peter