[#3109] Is divmod dangerous? — Dave Thomas <Dave@...>

14 messages 2000/06/06

[#3149] Retrieving the hostname and port in net/http — Roland Jesse <jesse@...>

Hi,

12 messages 2000/06/07

[#3222] Ruby coding standard? — Robert Feldt <feldt@...>

16 messages 2000/06/09

[#3277] Re: BUG or something? — Aleksi Niemel<aleksi.niemela@...>

> |I am new to Ruby and this brings up a question I have had

17 messages 2000/06/12
[#3281] Re: BUG or something? — Dave Thomas <Dave@...> 2000/06/12

Aleksi Niemel<aleksi.niemela@cinnober.com> writes:

[#3296] RE: about documentation — Aleksi Niemel<aleksi.niemela@...>

> I want to contribute to the ruby project in my spare time.

15 messages 2000/06/12

[#3407] Waffling between Python and Ruby — "Warren Postma" <embed@...>

I was looking at the Ruby editor/IDE for windows and was disappointed with

19 messages 2000/06/14

[#3410] Exercice: Translate into Ruby :-) — Jilani Khaldi <jilanik@...>

Hi All,

17 messages 2000/06/14

[#3415] Re: Waffling between Python and Ruby — Andrew Hunt <andy@...>

>Static typing..., hmm,...

11 messages 2000/06/14

[#3453] Re: Static Typing( Was: Waffling between Python and Ruby) — Andrew Hunt <andy@...>

32 messages 2000/06/16

[#3516] Deep copy? — Hugh Sasse Staff Elec Eng <hgs@...>

Given that I cannot overload =, how should I go about ensuring a deep

20 messages 2000/06/19

[#3694] Why it's quiet — hal9000@...

We are all busy learning the new language

26 messages 2000/06/29
[#3703] Re: Why it's quiet — "NAKAMURA, Hiroshi" <nahi@...> 2000/06/30

Hi,

[#3705] Re: Why it's quiet — matz@... (Yukihiro Matsumoto) 2000/06/30

Hi,

[ruby-talk:03729] Re: Why it's quiet -- Ruby features -- Arrays

From: Conrad Schneiker <schneik@...>
Date: 2000-06-30 18:53:41 UTC
List: ruby-talk #3729
Hi,

Dave Thomas wrote:

> Conrad Schneiker <schneik@austin.ibm.com> writes:
>
> > Any chance that Ruby 1.6+ will have a built-in standard
> > multidimensional array?  Especially since 2-D arrays are a very
> > common data type that seem to turn up frequently in tables for
> > general data processing, plus for graphics, math, engineering, and
> > physics?
>
> Apart from performance, are there any advantages to building this in,
> rather than using the array and matrix library modules?

Apart from performance, is there any advantage to flying 1,000+ miles
across the ocean rather than swimming? :-) I wasn't thinking about
performance differences, but if it was a 5x difference for the 2-D case, I
think that would be sufficient reason.

Please excuse my imprecision with regard to "built in"--I tend think of
the standard (i.e. as shipped, out-of-the-(tar-file)-box) Ruby library as
an integral (i.e. official) part of Ruby. My primary concern is that
multidimensional arrays be supported "out of the box" as a standard
class/objects/datatype that everyone refers to the same way.

> In general, I'd suggest that one of the charms of Ruby is its small
> conceptual size.

Well, it's _relatively_ small conceptual size compared to (say) C++ is
certainly nice, but it's one of several charms. If the conceptual size of
Ruby were any smaller, I think many people would regard this as
suboptimal. For example, Tcl can make the same claim about small
conceptual size, but this has previously led to a variety of incompatible
extensions. What are the odds that Ruby has reached the optimum conceptual
size, all things considered? It may be pretty close, but I don't think it
is has yet reached that size. From a user's point of view, not having
something as common as multidimensional arrays available "out of the box"
in a way that is the most natural generalization of 1-D arrays makes the
use of Ruby somewhat more conceptually complex when they need arrays.

> Even though many of the basic types are built in, we can pretend that
> they're not, that instead they are add-in library modules. The built in
> types do not add any new syntax to the language. My vote for future
> enhancements would be that if it _can_ be done outside the core of the
> language, it _should_ be done outside the core.

Well, obviously you wan't to be careful about what you add to the core,
but I think it is going too far to always do this when possible. After
all, we want Ruby to be supremely _pragmatic_! :-) ... especially for
students, scientists, engineers, and currency crunchers!  In cases where
there is a syntactic advantage in terms of greater clarity and consistency
and naturalness of expression for very commonly used items (and/or
substantial performance advantages), I think they should be done in the
core--if the feature in question is widely used. I don't know to what
extent these considerations apply to multidimensional arrays, but I do
know that 2-D arrays are very widely used. Multidimensional arrays are not
some exotic or comparatively rare data type, and I don't think adding them
to Ruby is going to open Pandora's box of conceptual feature bloat.

In any case, I am all for multidimensional arrays being part of standard
Ruby (as the out-of-the-box programming language), regardless of whether
it is built into the core for performance/syntactic reasons or implemented
as a standard Ruby module.

--
Conrad Schneiker
(This note is unofficial and subject to improvement without notice.)



In This Thread