2006/2/2, Frederik 'Freso' S. Olesen <[EMAIL PROTECTED]>:
> 2006/1/5, Isak Savo <[EMAIL PROTECTED]>:
> >2006/1/5, Axel Liljencrantz <[EMAIL PROTECTED]>:
> <zap>
> >> Reasons why I feel and is better than &&:
> >>
> >> * Smaller syntax with fewer special syntaxes
> >> * Easier to learn if you're new to scripting, since you can find out about
> >>it through tab completion
> >> * The syntax is more closely related to the 'if' syntax
> >
> >Good points, although the "easier to learn" point is double sided.
> >Anyone with previous programming/scripting knowledge understands the
> >'and' operator to be, well, an operator and not a command. Having it
> >as a builtin makes it inconsistent with most other
> >scripting/programming languages (which may or may not be a good thing,
> >depending on your design goals)
>
> Python uses "and" and "or" instead of "&&" and "||", just for the
> record, and it really just comes down to a matter of habit, I think.
> :) (Although I suppose it's still an operator in Python and not a
> command.)
> And for people who are used to programming, it shouldn't take much
> effort to replace &&/|| with (; )and/or, IMHO.

Especially given the following error message when you slip up and use
Posix syntax:

fish> make || make clean
fish: Expected a command name, got token of type 'Pipe'. Did you mean
'COMMAND; or COMMAND'? For more information on the 'or' builtin
command, see the help section for 'or' by typing 'help or'.
make || make clean
      ^
fish>

Fish gives the same kind of suggestions for ${VARNAME} instead of
{$VARNAME}, $(COMMAND) instead of (COMMAND), etc.. I'm planning on
adding such messages when using 'then' and 'do' at the beginning of if
and loop blocks as well.

>
> ps. Yay for month-old replies...

Just goes to show that you have a long attention span!

> --
> Frederik 'Freso' S. Olesen <http://freso.dk/>

--
Axel
N�HY޵隊X���'���u���[�������
ަ�k��!���W�~�鮆�zk��C� [EMAIL PROTECTED],����a{�
��,�H��4�m�����Z��jY�w��ǥrg

Reply via email to