| Brian Hulley 2005-02-28, 3:59 pm |
| I think most existing code could quite easily be changed to use '[|]'/2
for lists since when the '.'/2 functor is used explicitly in existing
code it is always quoted, so perhaps a search-and-replace for '.'( with
'[|]'( would suffice to port most existing code (except for cases where
lists are being broken apart with =.. and the functor explicitly
compared with '.' ....)
Or perhaps there could be an option such as that used in C++ compilers
to specify whether to use K&R or Ansi scoping for the variable in a for
loop.
There would probably also have to be a convention for the term reader
such as "if the whitespace after the full stop contains a new line
character then the full stop is a terminator else it is treated like
any other atom" so that
a :- b . c . d.
e.
would be parsed as 2 clauses not one clause. (This kind of convention
is similar to the way that the functor atom has to be directly "glued"
onto the opening bracket for a compound term with no whitespace in
between.)
Cheers - Brian.
|