[e-lang] record syntax for E, please help

Kevin Reid kpreid at mac.com
Wed Jan 9 09:29:42 EST 2008


On Jan 8, 2008, at 21:26, Mark Miller wrote:
> On Jan 8, 2008 3:52 PM, Kevin Reid <kpreid at mac.com> wrote:
>
>> ? def [=> makeLanguage] := recordType`name :$String := ${"E"},
>>>                                     popularity := $high,
>>>                                     rating :$int`
>
> I know it is only an example, but what kind of thing are you  
> assuming is bound to high?


Not sure why this is worth thinking about, but just so it's well- 
defined, I shall:

def [Pop, none, low, medium, high] := {[
   interface Pop guards PopStamp {},
   def none   implements PopStamp {},
   def low    implements PopStamp {},
   def medium implements PopStamp {},
   def high   implements PopStamp {}
]}

How's that? :)

By the way, your mailer is including an unneeded and confusing-to- 
mine text/html version.

-- 
Kevin Reid                            <http://homepage.mac.com/kpreid/>




More information about the e-lang mailing list