[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Rather, DSSLs increase modularity, productivity
Daniel Weinreb wrote:
> Miles Egan wrote:
>
>> I'd describe generics as an attempt to make the type
>> system more flexible.
>>
> OK, if that's what you meant by "loosen". "Loosen" sounded as if you
> meant
> "to make the type system less restrictive" as in "to make it more like
> a language
> where variables are untyped", which would not be accurate. The most
> classic
> use case for generics in Java is so that you can have a collection
> class whose
> elements are specific to one type. It makes your code nicer since you
> don't
> need to do a cast on the result of an operation that returns an
> element of the
> collection, and it means that the checking is done by the compiler
> instead of
> at runtime. So you get more static checking, not less.
No, in Java's version of generics the checks are still done at runtime;
the compiler just generates them for you.
- Christopher
>
>
>
- References:
- Re: dual-language systems increase modularity
- Re: dual-language systems increase modularity
- From: Michael Vanier <mvanier@cs.caltech.edu>
- Rather, DSSLs increase modularity, productivity
- From: Mike Newhall <mike@newhall.net>
- Re: Rather, DSSLs increase modularity, productivity
- From: Michael Vanier <mvanier@cs.caltech.edu>
- Re: Rather, DSSLs increase modularity, productivity
- From: David Lichteblau <david@lichteblau.com>
- Re: Rather, DSSLs increase modularity, productivity
- From: Michael Vanier <mvanier@cs.caltech.edu>
- Re: Rather, DSSLs increase modularity, productivity
- From: Miles Egan <miles@caddr.com>
- Re: Rather, DSSLs increase modularity, productivity
- From: Daniel Weinreb <dlweinreb@rcn.com>
- Re: Rather, DSSLs increase modularity, productivity
- From: Miles Egan <miles@caddr.com>
- Re: Rather, DSSLs increase modularity, productivity
- From: Daniel Weinreb <dlweinreb@rcn.com>