[plt-dev] coding ideas from JaneStreet

From: Paulo J. Matos (pocmatos at gmail.com)
Date: Tue Apr 13 04:42:14 EDT 2010

Eli Barzilay <eli at barzilay.org> writes:

>> 
>> The code that I'm talking about is a dialect of typed scheme that has
>> ML-like type definitions and matching, with the same kind of errors
>> when matches don't cover all cases, and when there are patterns that
>> are not reachable.  It's working only for these type definitions (not
>> on the usual scheme types, not on unions, etc -- only on types that
>> were defined using the ML-ish form).  But for the class it provides
>> the same advantage that ML has -- if you extend the AST definition
>> with a new variant, the compiler will tell you where you're missing
>> cases to deal with it.
>
> (Oh, and while this is a dialect of TS, the code predates it, and did
> the same with plain scheme structs previously.)

Awesome, this one of my favourite features missing in Scheme. Hopefully
we will see this soon in TS, Sam?

--
PMatos


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom


Posted on the dev mailing list.