Re: Existence Based Polymorphism
Conor Stokes <[email protected]>
| Newsgroups | gmane.games.devel.sweng |
|---|---|
| Message-ID | <[email protected]> |
"Mostly they don't have these problems because objects of user-defined
type live on the heap, so the compiler only needs to know how to
compile a pointer to an object. That's the same as using pointers in C
and C++ and in that case you don't have to #include anything."
While this is true of Java, it isn't true of .NET, where user defined value types can live on the stack and be encapsulated just fine. It is important to note that Java still compiles each class separately, where as .NET uses assemblies built as a whole in multiple passes. There is talk of adding value types to the JVM for efficiency reasons though, which wouldn't be that hard to do because the JIT can generate the appropriate code at runtime anyway.
"The fact that those languages have a well defined ABI has some
advantages but it is also a source of overhead and an obstacle for
deployment on many platforms."
Really, you can have a well defined ABI for when you're doing compilation and pulling in libraries and then chuck the lot away for the end product. I mean, you don't ship your header files with your binary on those platforms either. It can all be turned into lean mean lightweight native code at the end and this has been done for platforms like the iPhone to produce single pure binaries (I believe the Mono folk did something like this, obviously Miguel could tell you more about this than me).
Cheers,
Conor
_______________________________________________
Sweng-Gamedev mailing list
[email protected]
http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com