On Wed Sep 20, 2006 at 14:40:25 +1000, Andre Pang wrote: >On 19/09/2006, at 6:34 PM, Erik de Castro Lopo wrote: > >>I also suspect that the flexibilty you see in Perl/Python/Ruby >>has little to do with dynamic typing and has much more to do with >>Perl/Python/Ruby being high level languages in comparision to >>the statically typed languages you know like C/C++/Java. > >Yeah, I think the power you get from Perl/Python/Ruby is actually due >to two language runtime features that are totally orthogonal to >dynamic typing: > > 1. A rich reflection/introspection API[1], and > 2. Forwarding a method call on a non-existent method name on to a >method[2]. > >The two features, combined, grants huge power, and I these two >features are what's missing from the mainstream languages. As an >example, I think all of Rails's really cool features (e.g. active >records) rely heavily on both these features. If you stripped out >Perl/Python/Ruby's method forwarding facilities and their reflection >API, what you have is a pretty boring language indeed. > >You can do both of these things in a statically typed environment; >it's just that the static type camp hasn't seem to have acknowledged >how useful these facilities are for making long-lived, extensible >programs. Java is the only language I know off the top of my head >that is statically typed and has a reflection API, but it still >doesn't let you have feature (2) above, and its reflection API is >cumbersome to use. C++ has Run-Time Type Information (RTTI), but >that's so featureless that it's practically useless. I'd love to see >a language with a static type system as powerful and useful as >Haskell's with a reflection API that's as powerful as Perl/Python/Ruby. >
Hi Andre, Thanks a lot for your analysis. I think you really hit the nail on the head with that. Cheers, Benno Mmm, that sounded a little sycophantic. _______________________________________________ coders mailing list coders@slug.org.au http://lists.slug.org.au/listinfo/coders