|
From: Slava P. <sl...@fa...> - 2008-06-28 03:47:11
|
On Fri, Jun 27, 2008 at 10:43 PM, Chris Double <chr...@do...> wrote: > On Sat, Jun 28, 2008 at 3:21 PM, Slava Pestov <sl...@fa...> > wrote: > > TUPLE: color red|integer green|integer blue|integer ; > > So '|' would no longer be a valid symbol in word names? Or just in tuple > names? Just in tuple _slot_ names. > > > > 1) Support a per-type notion of 'default value'. This would be roughly as > > follows: > > How would this work with union types? For example I want a type that > is either an integer or a false value. What would be the default value > then? Or are union types not allowed? Depending on how I implement it, it would either be 0, or f. > > > > > > Each slot specifier would either be a string, a two element array (name, > > default value) or a three element array (name, class, default value). > > How about the ordering for the three element case be (name, default, > class). This way the ordering is the same as the two value version. Makes sense. > > > > But we'd encourage this: > > > > TUPLE: color "red" "green" "blue" ; > > Why would you encourage that vs the version without quotes? The > version without quotes is nicer to read and easier to type. I guess. Slava |