Variable names and symbols starting with a number.

Per Bothner per@bothner.com
Wed Jan 31 19:43:00 GMT 2007


Kjetil S. Matheussen wrote:
> Its probably useful in some cases,

I have mixed feelings myself, but one area is typesetting
or GUIs, where you might want to say that something is
2cm to the right of something else.

It also is useful for time durations:

(sleep 2s)

> but is there any way to turn it off?

Yes - use escape markers:

#|kawa:1|# '\22gg
22gg
#|kawa:2|# '|22gg|
22gg

I could implement a hack where quoting a units value or form
turns it into a string.  I already do something like this
for the colon operator, to handle 'foo:bar, in the cases
where there is foo in the static scope.

Another option worth considering is only recognizing units
tokens after importing some units library, and more
specifically only those units that are in (static) scope.
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/



More information about the Kawa mailing list