From: Rafael 'Dido' Sevilla Date: 2002-08-09T11:42:02+09:00 Subject: Re: Compiling Ruby to Native Code? On Thu, Aug 08, 2002 at 08:45:07AM +0900, Lothar Scholz wrote: > Dynamic typing is the one and only problems ! > It seems that you never did serious Objective-C programming otherwise > you would now that this is C with objects and most of the important > data structure algorithms are done with the static c types. > Are you trying to say that if I do: gcc -x objective-c -o test test.m -lobjc the resulting executable is *NOT* native code? All I've been trying to say is that a native code compiler does exist for Objective-C, and dynamic typing has not stopped NeXT/GCC from making it. > You will never get a compiler so efficient as Ocaml or Eiffel in > dynamic languages - both are able to do full system analysis. So they > don't need any checks about virtual methods. > The fact is this inefficiency exists does not change the fact that you *can* make a native code compiler for the language. Unless your program is highly method invocation-bound, the native code version will probably run much faster than the interpreted one. And even then, it may be possible to provide optimizations; I imagine a lot of research has gone into optimizing dynamic method invocations, as polymorphism is worthless without some form of dynamic typing. -- Rafael R. Sevilla +63(2)8123151 Software Developer, Imperium Technology Inc. +63(917)4458925