[DGD]Type checking.

Ludger Merkens balduin at uni-paderborn.de
Tue Apr 11 15:48:17 CEST 2000


On Tue, 11 Apr 2000, Felix A. Croes wrote:

[...]

> > string *foo;
> >
> > void bar(string frog) {
> >   /* do something with frog */
> > }
> >
> > void create() {
> >   foo=({ this_user() });
> >   bar(foo);
> > }
> >
> > Does not give a run-time error when you assign ({ this_user() }) to foo.
> > The error comes when you try to call bar().
> 
> Yes.  This could be flagged both as a compile-time error and an early
> run-time error, and both opportunities are missed.
> 
> LPC has some typechecking quirks that are hard to get around, mostly
> due to the existence of the "mixed" type.  Also, doing runtime
> typechecking of arrays can be quite expensive.  Java has solved this
> in a way that avoids typechecking of each element of an array at
> runtime, but unfortunately even Java cannot avoid expensive runtime
> type checks altogether (though Sun has claimed that it does).

How do they (try to) solve this problem ?

> 
> You can expect the above to result in a compile-time error at some time
> in the future of DGD's development.  Runtime typechecking probably
> will not change.
> 
> Regards,
> Dworkin
> 
Ludger



List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list