Darren New wrote: > Christopher Smith wrote: >> bounded vs. unbounded. > > The past tense of bind is bound. The adverbial form of bound is bounded. > > "unbounded" -> With no boundary. > "unbound" -> Disassociated. > > The declaration "int i" in C makes i bound to a bounded range of values. > > It's not obvious from your description which one you're talking about, > and lots of non-native speakers of English get this wrong, so I > thought I'd point that out. Sorry. He means "bounded" in the sense that you need to have a predefined type (base class) for the polymorphism. > Plus, it's not really clear what axis something like Smalltalk or C# > falls on. Smalltalk would seem to be dynamic but bounded, while C# is > static (ignoring polymorphism) and bounded. Smalltalk would be dynamic and unbounded, because the polymorphism is entirely at runtime, and there is no requirement to define a base class. You basically just need to implement the right protocol, just like with templates. >> also argue that technically stuff like COM shows that C++ leaves enough >> of a door open to do runtime, unbounded polymorphism, but concede that > > I'm pretty sure you have to violate the rules of the C++ language to > actually implement this. I.e., you have to go outside the defined > language semantics to do anything like loading new code and jumping to > it. Unlike, say, Ada, where handling interrupts and loading code > dynamically and all that sort of thing is actually supported by > language features. The only "rule" being violated, AFAIK, is casting between pointers to data and pointers to functions. That's a rule that comes from C, and is generally ignored by compiler writers as well as programmers (indeed, POSIX pretty much demands it be ignored). I'm not entirely sure that Windows has the same questionable semantics that POSIX has (the relevant functions are escaping me right now), but I *think* that even that violation is not necessary for dynamically loading code on Windows.
In general, as Java (and Ada before it) has demonstrated so well and so often, while there are advantages to a language define all aspects of the runtime environment, it can be a good think to leave some of the work to a platform. --Chris -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg
