From: Enric Lafont Date: 2002-11-04T20:44:35+09:00 Subject: Re: Thoughts on Ruby Austin Ziegler wrote: >[ .... a lot of valid comments snipped ... ] > >Matz determined that String, Regex, Array, Files, and Hashes (among >other thigns) are necessary parts of the language. Given the sorts >of work that I've done with Ruby so far -- I agree. > > Ok, it was his decission, but Ruby will not lost a single bit of expressiveness if you delete the String class, becasue String is not part of the language, it's part of the Ruby environment, you can write s String class (a less efficient one) with the Array class, same for hashes and Regex. >>You will like then the Perl's "there is a hundred ways to do it" >>slogan.. :-) >> >> >It's actually "TMTOWTDI" -- there's more than one way to do it. >Indeed, this is the mark of a mature, expressive language. Look >closely at your own native human language -- there's more than one >way to express something. Even silly invented languages like logban >have multiple ways of expressing ideas. > Ok, I was kidding. I don't want to enter a discussion on how much diferent ways to say one thing you need to be expressive. In human languages, when you have more than one way to say something you can need an interpreter (lawyer) to correctly decipher what it was intended to say, and in some cases, even a judge. Expressiveness is not ever a good thing >>The fact that there is more than one way to express something, >>weakens the mastery of the language. It's right sometimes becasue >>it makes things so "eye sugar" , but I prefer ( I PREFER, it's me, >>my option) a one way to do things, it makes things easy to code >>and easy to read your own code and the one made by others. >> >> > >That's what coding standards are for, not programming language >designs. > There is a Ruby Standard I can follow ? >I don't see it as flexibility lost. I see it as "utterly stupid >behaviour" prevented. There is no legitimate reason for someone to >define a = a + b to be different from a += b. > I'm sorry to seem an stupid for you .... ;-) You have decided that the semantic (meaning) of "a += b" is "a = a + b, and it's right in some contexts, but if want to define a new meaning to a +=b. I will need to use other language to express what "+=" means, or using a method like "agregate" or "addEqual" lossing compactness and readability. In our world and in our context is right, but I would like to have the option to redefine it. Anyways I can live without it >There's more problems with C++ than the "lack of solid background"; >I suggest that Smalltalk, if it were as popular and widespread as >C++, would have a lot of the same stupid behaviours (like the >idiotic redefinition of a+=b differently from a=a+b). > I disagree... Smalltalk forces you to learn A LOT. >There is no compile time. > OK, parse-time, load-time, use the one you like more >It *will* break things. If string[i] no longer returns an integer, >then code will break. There are numerous libraries out there -- how >many of them use this behaviour? I don't know -- but there's a big >chance of breakage -- and not everything is easily available >anymore. > NO, if "char" responds to the same methods as Fixnum does. Char and Fixnum are essentially the same thing, a Magnitude. >Parrot isn't Ruby's bytecode system, although it may work with it in >the future. > > Ok, thanks for the info, I'll take a look at the Ruby bytecode engine as soon as it becomes available.