From: Bulat Ziganshin Date: 2002-09-26T23:24:39+09:00 Subject: Re: adding overload to ruby Hello William, Thursday, September 26, 2002, 5:54:30 PM, you wrote: WDT> Hi All, WDT> I sense that this discussion is related to a previous question, "Has a WDT> 'Scripting Language' Been Used for Real Business/Corporate World WDT> (read: large-scale) Applications?" WDT> Also a person asked before that since there is no compile-time type WDT> checking, probably that is what hinders a "scripting language" from being WDT> used in large scale corporate development. WDT> We all know the facts that large-scale software, including Ruby WDT> itself, currently is almost always written in C, C++, or Java. (Yes, WDT> probably there are others, such as Eiffel, but I don't know.) And we see WDT> that these "large-scale software" languages all have type WDT> declarations. We all know the benefits of type declaration, although it WDT> usually increases the development time. WDT> Now, I think we have two options. First, it seems that some people WDT> (myself included) are really interested in doing large scale software WDT> development in Ruby. This has resulted in the discussion on "private WDT> variables" among other things. Now, we are discussing WDT> "overloading". This is good, but the only problem is that if we keep WDT> adding more complexity (read: not language library) to the language WDT> itself, I think we are doing the same thing to Ruby what has happened to C WDT> by C++. WDT> The second option is we do not change Ruby too much, and we leave large WDT> scale software development problem to the core by writing the core in C, WDT> C++, or Java (with JRuby) and use Ruby more on the interface. Surely we WDT> don't like to write in C/C++/Java, but from performance alone (Java may be WDT> excluded), probably it is the right thing to do. WDT> Finally, since people love writing in Ruby so much, probably more research WDT> should be done on how to ultimately create a translator from Ruby to, say, WDT> C. Even the rb2c web page WDT> (http://easter.kuee.kyoto-u.ac.jp/~hiwada/ruby/rb2c/) states that you can WDT> get scripts run "a little bit faster". that's because of dynamic typing. even when you write "2+2" you don't know whether answer will be 4 or 5 :) declaring argument types can be on the way to effectively compiling ruby; i think that prototyping w/o strict typing and writing real program with strict typing will be "right way" :) on the other hand, we can use type declarations to statically select implementation of method, so that Fixnum a return a+1 can be translated in integer addition and not method call -- Best regards, Bulat mailto:bulatz@integ.ru