bloom-lang / bud

Prototype Bud runtime (Bloom Under Development)
http://bloom-lang.net
Other
854 stars 59 forks source link

temp should have convenient schema-spec syntax #235

Open jhellerstein opened 13 years ago

jhellerstein commented 13 years ago

It's annoying to see array offsets on temps, so it's tempting to not use temps at all. This is particularly bad with "withs" since they serve an additional role for scoping.

neilconway commented 13 years ago

I played around this with briefly, but couldn't find a nice syntax that I could convince Ruby to parse. For example, this is rejected:

with :tmpy(:key, :val) <= inski, begin

This parses and could be made to work with sufficient rewrite-fu:

with :tmpy, [:key, :val] <= inski, begin

Syntax is a bit unfortunate though.