[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Rather, DSSLs increase modularity, productivity
Shriram Krishnamurthi wrote:
>> Type declarations are optional in Curl, but when you
>>do declare them the compiler will check types statically and will
>>generate better code based on what it knows about the type.
>>
>>
>
>If I pass the values in type-annotated variables to un-annotated
>functions, how will Curl "check types statically" (or what does this
>even mean)?
>
>
Unannotated variables or parameters have the static abstract type 'any'
(which could also be declared explicitly), which is the supertype of all
types in Curl. The compiler does check for type compatibility, but
since all types are compatible with any, the check will never fail. The
compiler is only going to be able to generate better code if the static
type is narrower than 'any'.
- 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: Christopher Barber <cbarber@curl.com>
- Re: Rather, DSSLs increase modularity, productivity
- From: Shriram Krishnamurthi <sk@cs.brown.edu>