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

Re: a note on notations



> Maybe I'm just really dumb, but this particular overloading looks like
> it could get very confusing indeed.  And notice that
>         ; echo `ls
> works, but
>         ; echo %ls
> doesn't. 

yup.  that's life.  i've looked at some code with %{} and % $&primitives,
and for %, you really want to use the braces, even if they're optional.
" probably doesn't suffer from that problem, but
	x = "src
is bound to be just too confusing for everybody who's used any other
programming language.

> if we're running out of characters at
> v0.8, how much more will we need them in v1.8?

oh, i expect to have a good 63k available at that point.  :-)

> There are many
> constructs I avoid in rc and es because more visually distinctive but
> otherwise equivalent constructs exist -- readability is damned
> important -- and `foo falls into this category.

there are almost no constructs i can think of that i avoid in es.
but then again, i am one of the authors.

as to readability, there are some things which are hard to read. <>{} is
one of the biggies in my mind.  %$#primitives in my current initial.es
is even worse.  but i type `src and `locked so many times in a day that
they've become very readable.  in my mind, they are intended for use on
command lines (interactive use) much more than scripting use, because i
tend to not use so many commands with implicit arguments in scripts.

a side note on the history of `foo:  i was Byron's first user for his rc.
way back when, i had adopted rc as my shell before globbing made it in
there.  i had a little shell script called star:
	#! /bin/sh
	echo *
which i used quite a lot.  but typing
	bundle `{star} | mail byron
the braces were obviously superfluous, and that's when that hack made it
in there.  es just makes it more natural because {...} is already a word.

> > $& has everything to do with lookup:  it looks up a procedure pointer
> > in a dictionary of primitives.  see prim.c.

> Just because you chose to implement it as a lookup doesn't mean it
> intrinsically has ANYTHING to do with lookup in the sense that $foo
> does.

i disagree.  you're referring to an value in the namespace of primitives.
i call that looking it up.

> %%foo is at least clearly related to %foo; $&foo is not.

%%foo is a legitimate es variable name, $&foo is not.  that's the difference.

> Finally, if you take away my ability to use % as a command name, I'm
> going to be spitting PASTEL PINK comets with BRIGHT ORANGE spots and
> LIME GREEN stripes.  Take a look at my email address if you doubt
> it...

John's comet-spitting abilities have little to do with why i don't like
using : as the es call function.  cultural compatibility is the winner
there.  as i've said, i'm leaning towards % but i want other people's
opinions.  i don't want to require UTF for es, and all of
	$ % : , "
have serious problems.  i'm happy to go back to a two-character operator
if someone can suggest one that is
	currently illegal es syntax (or at least useless in es)
	somehow implies a call operation

-- paul (waiting for a consensus to emerge)