should languages explicitly identify identifiers as value/definition/free?
It seems that identifiers in programming languages can either: (a) have a
value already that is to be used; (b) be being declared; (c) be free. For
example one would expect that in "def incr n = n + one" that: one already
has a meaning that is to be used; incr is being defined; and n is free. In
the design of the Wombat programming language (see
http://wombatlang.blogspot.com.au/2013/06/the-wombat-has-landed.html) the
syntax is made substantially less rigid by explicitly identifying these
options: Identifiers being declared are preceded by backquote (), and free
variables start with an _ (or are underlined in the rich text form). So
the example becomes just: "incr _n = _n + one", but the advantages arise
in more complex examples declaring multiple names. Is this explicit
identification a worthwhile language feature?
No comments:
Post a Comment