Re: Language Choice

Tech-Archive recommends: Fix windows errors by optimizing your registry



lee.holmes@xxxxxxxxxxxxxxxxxxxx wrote:
We looked at the possibility of having "==", "=<", and "=>" (there
are enormous threads on it in the Beta newsgroup archives,) but
ultimately decided that our current operators were the best tradeoff.

And hey, Bash and Perl's both had eq/lt/etc... foo for years; nothing
wrong with that. There are certainly worse language conventions to
follow :)

if ( $a -lt 1 ) #MSH
if (("$a" < "1")) #BASH
if [ "$a" -lt "1" ] #BASH alt.
if ( $a < 1 ) #PERL numeric*
if ( "$a" < "1" ) #PERL Usually a boo boo* ;)
if ( "$a" lt "1" ) #PERL String*
if ( length("$a") < "1" ) #PERL String alt.*

Which is better? I don't know. Hey, they all have the same comment
char! That's a good thing. =) MSH version is certainly less to type :)

*MSH is also not confusing for the uninitiated :)

Cheers,

~Jason

--
.



Relevant Pages