Jakub Hegenbart <kyosuke / seznam.cz> writes: > Bill Atkins wrote: >> Common Lisp supports something like that. All values are dynamically >> typed by default (as in Ruby), but typing can be added to specific >> areas where you need it. The user can decide whether to have the >> typing used only as a compiler hint to get faster code, and/or to have >> it enforced so that an error will be signaled when an attempt is made >> to store an object of the wrong type into that variable. > Well, personally, I really like Common Lisp and its approach. But > concerning compiler hints...what about the Stalin Scheme compiler? I > recently started studying compiler techniques it uses and it almost > convinced me that there _is_ such a thing as the legendary > "sufficiently smart compiler". :-) I'm just wondering, if there is > such a thing for Scheme, would Ruby also benefit from such a kind of > compiler? Such a dynamic object model that Ruby uses is quite a beast > to tame, on the other hand, the optimizations that Stalin performs are > nothing short of a miracle. ;-) Oh, but the time it actually needs to compile and the megabytes of C it generates... not worth in the general case, IMO. And Stalin code still is far not as run-time dynamic as Ruby. (Which is the real problem. We should have something like "eval-on-compile".) > Jakub -- Christian Neukirchen <chneukirchen / gmail.com> http://chneukirchen.org