This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Variable names and symbols starting with a number.


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]