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

Re: backslash



> Is what you've done with backslash _really necessary_?

necessary?  no.  useful, we think so.  in the same category as many
of the other creatures which have feeped their way into es.  here's
a list of 10 features, some of which are in es, some of which may be
some day, and some of which probably won't.

	1. backslash escapes
	2. ~ expansion
	3. job control
	4. sorting of the environment
	5. %split and %fsplit
	6. for with multiple variables -- for (i = 1 2 3; j = a b c)
	7. $&newfd and the protecting of es' file descriptors
	8. readline support
	9. redirections without forking
	10. hooks for arbitrary command completion code

[for the record, 1,2,4,5, and 6 are in 0.7, and 7, 8, and 9 will be
in 0.75]

none of these is desired by everyone, i would guess.  i'm not going
to go through and explain what i feel about each on, and i ask the
es mailing list very strongly not to send notes saying ``i want 6
but don't want 7 and if you keep 2 in there may fleas infest your
armpits.'' i expect that if we did poll a large number of shell
users we'd get close to 1k different responses as to what people
wanted.

none of the above features, by the way, is essential to es' ``mission,''
which is to explore the uses of a command language with hooks all over
the place and first class functions/closures.

we already have, in my mind, the perfect minimalist shell.  it's rc.
it's not the smallest shell one could use, but probably the smallest
shell that hundreds of different people could find comfortable to use
in these days of bloat.

es is different.  it's much more of a general purpose programming
language.  yes it's a shell, and we're hoping that it's a great one
to use.  we're also hoping that eventually it can be the same sort
of extension language as tcl, but we think it will be more useful
because of the synergy of using the same language as your shell.

because of that, es is more featureful.  \ escapes are just one
example.  i use \n all over the place, and it has the nice feature
that it goes into history files better than '
' does.  \t (i think) makes script more readable.  look at the
definition of ifs in initial.es, for example.

> I really, really, REALLY don't want to
> have to change my history character AGAIN.

backslash as your history character?  really?  do you use it in rc?
what do you do about rc's meaning of \ as the continuation marker?
or do you just never type backslash-return.

i'm sorry, but that's just not a good enough reason for use to cut
out using a traditional escape character with the meaning it has
in many programming languages.  certainly it's not exactly what
it means anywhere else, because to keep quoting rules simple,
backslashes are only interpreted outside of quotes, but that's
not much of a distinction.

> I have no problem at all with `{echo -e \a}.

i do.  i've never liked echo -e one bit.  (with the -e ala v8
or without ala sysV.)  there you have to fork and exec in order
to get at something i really believe you should be able to say
inside the language.  and which you can in fact, say inside the
language, just with messy quoted expressions.

sorry if this note went on too long.