Hi,
grey wolf wrote:
you just described Java and its many "features".
Well, Java doesn't have bounded parametric polymorphism yet (and it's not fully statically typesafe anyway), but the features listed were close to what it's supposed to have RSN. It does not, however, fully type side-effects (as Haskell does) or allow explicit slicing ("execute this function, but don't allow it to do file output"), which I admittedly haven't seen anywhere in live action anyway, though.
grey wolf wrote:
all of the things you mentioned can be done in C++ by an experienced programmer. it does, admittedly, require a bit of effort, but it is quite possible.
Doesn't that violate the principle of information hiding? Given an arbitrary object, how can I hope to marshal it without explicit support by its original programmer? Similarly, how can I turn it into a "networked" object if I don't have reflection capabilities to determine (at runtime) which methods the object exports in the first place?
If you have all the code, you can always work around these things by coding them by hand (or using preprocessors, which would be somewhat more appropriate). But that means it's not a language feature, or something you can provide with a library-- you'll have to use external tools.
(LISP's meta-programming facilities mentioned above try to capture as much of the potential use of pre-processing facilities as possible in-language, so they would count-- but LISP is dynamically typed and thus beyond what I'm trying to look into).
grey wolf wrote:
object serialization, BTW, is a function provided by a library in Java, so a similar feat in C++ would mean simply a new library.
I'm pretty sure it's not a library feature (although Java tries to make it look like one)-- otherwise, information hiding would be violated severely.
Note that networked objects (non-migratable ones) can be done reasonably if reflection capabilities are present, but these introduce something very similar to dynamic typing, so they're somewhat problematic from a "language safeness" point of view.
-- Christoph