From: jstern@... (Josh Stern) Date: 2001-01-20T18:40:02+09:00 Subject: [ruby-talk:9594] Re: 101 Misconceptions About Dynamic Languages Christian wrote: >If you want C++ code to work on a wide variety of compilers, with radically >different language support, of course you will become very limited in what >features and techniques are available. That is obvious, and says nothing >about C++ itself. IMO, it actually says that the combination of i) language has only been standardized for a short time, ii) breaking with tradition, the C++ standardization process agressively drove the language evolution rather than codifying existing practice, iii) breaking with tradition, the language designers did not provide a working reference for all language features - witness the fact that no major compilers yet support the 'export' linkage directive for templates. >That said, some valid points are made convincingly. The fact that >proficiency in C++ implies proficiency in the environment in which it is >being used is true. Although it could be claimed that this is both obvious >and good, the point is taken that it can result in assumptions that fail in >a different environment. But there are ways and means, and POSIX is a good >start (most *nix's and Win2k are POSIX compliant, although again YMMV). It >could be claimed that POSIX is then "a part of C++". True enough, from that >perspective. POSIX specifies very, very little, but substitute GNU toolchain for POSIX and I would agree with you. > .NET has an 'object-oriented assembly language': it's called MSIL. >Out of interest, here's a sample. It was hard to look at that without some documentation describing the meaning of the primitives. Are there any decent on-line references? >Ruby does not have functions as first-class objects. You cannot pass a >function as an argument, nor return one as a result. At http://www.ruby-lang.org/en/compar.html, Matz says "Ruby's functions (methods) are not first class objects" but I don't understand this point, actually. Ruby does have the 'Proc' class which is a function object. Just like in C++, an instance method requires object to use it. However, one can easily pass tuples of , , , etc. which amounts to the same thing in Ruby because the thing that is invoked by a function call in the language is 'the thing bound to that name', not a hunk of code at a machine address. -= Josh