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

Re: compiling es



| > First impressions:  ``let'' and ``local'' are backwards!
| 
| hmm, what do people think about this?  

As I said, it's reasonable so long as you warn people.

| what's general opinion on adding a read primitive?  

Off the top of my head, howabout ``read'' which returns up to a
newline, ``read -n'' which reads up to n characters, ``read -d x''
which reads up to delimiting character x, where x can be a literal, a
character class, or \ooo.

| the main reason is that only null terminated strings can be passed in
| the environment or argv vectors.  we had debated this extensively, and
| decided strings with nul characters in them weren't important.  were
| we wrong?  (the garbage collector uses the fact that strings don't
| have nuls in them, but that's minor.)

I suppose it depends on what you are doing with them.  Perl makes good
use of the fact that it doesn't rely on terminated strings.  As I
indicated in my example, sometimes you snarf the output of a backquoted
program and perhaps you want to be sure that the shell won't discard
parts of that output.  Some tools, like gnu-find, can use nulls as
record separators to avoid ambiguities with newlines.  It would be nice
if the shell could safely deal with that kind of output.