|
|
Darren New wrote:
> Orchid XP v7 wrote:
>> (But then, presumably the module that uses this thing will handle all
>> creation and destruction.)
>
> Well, yes, that's the idea. That's one way it's better than C++'s
> mechanism, which requires you to (for example) recompile every client if
> you change the layout of the private bits of the class.
>
>> Also fun, you how cannot have an array of this thing.
>
> You can't have an array of pointers, or an array of the things? That
> seems odd if the former.
No, the latter; you can't have an array who's elements are a particular
type since the compiler won't know how big it is.
(Notice that Haskell has no such limitation; you can expose no
implementation information to THE PROGRAMMER whilst this information IS
still exposed to THE COMPILER. Indeed, you can even define rewrite rules
on the code in your library, so clients of the library actually have
their code transparently rewritten, and the clients don't need to know
this...)
Post a reply to this message
|
|