forked from jckarter/clay
-
Notifications
You must be signed in to change notification settings - Fork 0
Cull keyword explosion
jckarter edited this page Nov 17, 2010
·
3 revisions
Clay's syntax currently has 41 keywords! We should explore ways of simplifying the grammar without sacrificing readability or power of the language.
Some keyword groups have similar semantics and could be folded into a single keyword:
-
aliasandcallbynamedefinitions both have call-by-name semantics -
refandlvaluerespectively create and consume lvalues -
defaultandelse
Some fixed keyword syntax could be replaced with more general language features:
-
record,variant,enum, andinstanceall deal with types, and could be folded into a singletypefacility -
inlineandexternalcould be indicated using generalized function attributes. perhapsstaticandcallbynametoo -
and/orcould use a generalized named infix operator feature -
notcould be a function
Other keywords could be replaced with symbols:
-
=might work as anasreplacement in import statements:import bar = foo.bar; import foo.(bar = fooBar); -
inin for statements