From: Gully Foyle Date: 2004-07-23T07:42:00+09:00 Subject: Re: Which compiled language is closest to Ruby? Avi Bryant wrote: > Gully Foyle wrote in message news:... > >>I am currently using C++ as my compiled language but fell in love with >>Ruby recently :) >> >>Which compiled language is the closest to ruby? Are there any that are >>object-oriented and have support for blocks/closures? > > > What do you really mean by "compiled"? Are you interested in > producing small, standalone executables? Or producing a library that > you can easily link to from C? Or is that you want to have more > static error checking (and if so, how much)? Or do you just mean > "fast"? (And in that case, fast for what? Fast as in integer and > floating point performance comparable to C, or fast as in 100x faster > than Ruby for method dispatch, or... ?) > > The distinction between "compiled" and "interpreted" is a pretty > irrelevant one (and in fact these aren't mutually exclusive - a common > architecture for language platforms these days is to compile to > bytecode, which is then interpreted). If you want a sensible answer, > ask a more specific question. > > Cheers, > Avi Great questions. I'd like: reasonably small standalone executables--doesn't have to be tiny like c programs. understandable to require a largish runtime as a shared library similar to gcj programs. must be impossible to automate creation of original source code from the executable. ability to produce shared libraries in both Linux/*BSD and Windows (on Windows, I'd like to be able to use static libs I can use from Visual C++ 6 apps if possible in addition to dll) speed? faster is nicer but it doesn't have to be a speed demon since I can use c/c++ to optimize where needed and its easy to call those from ruby. any improvement would be acceptable--even 1%.