On 2/20/06, James Antill <[EMAIL PROTECTED]> wrote:
>  Also, personally, I don't see:
>
> echo a |; cat
>
> ...as anymore weird than:
>
> echo a ;;; ;;; echo  b
>
> ...which is already valid.

What about

echo a |;;;;;;;;; cat

If this is not allowed, then it seems "|;" is just a special case and
complicates the semantics of statements and pipes.

If the above outputs the same as "echo a | cat", then the rule is:
Newline and semicolon (';') end the statement (if not ended already),
while '|' ends the statement and pipes output from the previous
nonempty statement to next statement.

Then simplicity would require

echo a ||||||||| cat

echo a |||;;|;||;;;|;;| cat

etc to be allowed and output the same.

The problem with all these is that they are illegible; this syntax
encourages illegible code (including "|;")!  Why not instead allow
only

echo a | cat

echo a |
cat

and maybe

echo a |

cat


Axel wrote:
> >> > I guess an otherwise rather sane syntax should not be punished because
> >> > editors are stupid.
>
>  A much bigger problem IMO is that fish doesn't parse \\, and to add
> compatibility you'd basically need a full \ parser (you'd at least
> need to understand \ EOL and \\, at which point you might as well add
> \n \t \b \r \0xx \xxx etc.).
>
[...]
> >> Personally I like "\" as a line continuation character.  It's syntax
> >> that a lot of people are familiar and comfortable with.
>
>  Because people generally, IMO, don't like half of an idiom. Having
> \ EOL behaviour is an overall part of \ processing that people
> understand ... having just one bit is going to be very confusing.

Usually, perhaps, but in this case I think it would not be confusing.


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to