[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Lexical syntax for boxes



I don't see the use case for the lexical syntax.  In fact,
I'd classify it as a Bad Idea.

- A non-mutable #&datum is functionally equivalent to
datum, especially if auto-deboxing is supported.  Why
would you want this - and specifically why is this valuable
enough for special lexical syntax?

- A mutable #&datum is an anonymous initialized assignable global
static.  Global static variables are generally considered to be
dangerous and to be avoided.  Worse, if this is in the program text,
you're mutating the actual program.  You get into all kinds of nasty
questions about separation of compile-time and run-time.

Perhaps there is some use case for boxes as "holes" in data,
written to and read from a file.  But it still is hard to
come up with a problem this solves - after all you still
need some way to find the box you need to mutate.

- Making it unspecified whether a box is mutable
makes the feature non-portable and even more dubious.
--
	--Per Bothner
per@xxxxxxxxxxx   http://per.bothner.com/