From: Hugh Sasse Staff Elec Eng Date: 2000-03-16T17:53:13+00:00 Subject: [ruby-talk:01917] Re: Enumerations and all that. On Thu, 16 Mar 2000, Dat Nguyen wrote: > I wonder if attempt to program in Ruby pascal alike (or for that matter any > other language alike) is worthwhile. Overtime people with other languages All languages borrow from other languages. Enums are commen enough (Pascal, C++, Ada, Modula-2, and to some extent C) so it is not re-inventing Pascal. The point is that they allow strong typing, in the cases where it cannot be handled by differing method calls -- for variables holding a status, for example. If you want to be sure that a variable cannot be set to a silly value it seems a straightforward way to do it, and as it gives you names for numbers it makes code more readable. A similar thing is the range type, but that doesn't have names, just restrictions on value. > background would want to introduce flavors of their own. For instance I > innocently tried to implement matrix multiplication using nested loops like > I do in C, Tcl, Python, etc. That is nothing to do with strong typing. That is algorithmic. > Ruby may have its own idioms of doing things, not only at low level but also > conceptually like patterns. The gurus in Japan may have tons of such > wisdoms. Which is why I asked about it before implementing it. > > Dat > Hugh hgs@dmu.ac.uk