[Bluej-discuss] confusion over =
Paul McCard
p.mccard at btinternet.com
Thu Nov 29 22:26:47 GMT 2007
It was Ritchie who designed C. He has a lot to answer for - given
nearly 40 years of hindsight. But don't blame Brian Kernighan, he just
teamed up with Ritchie to write a very good book about it. :-)
Paul.
Michael E. Caspersen wrote:
> Dijkstra pronounced the assignment operator "becomes", i.e.
>
> a= b+c;
>
> reads "a becomes b+c". I like that; it's simple and clear!
>
> BTW, notice the asymetrical notation; since = is an asymmetrical
> operator, it should be written as such. This helps parsing the
> statement; it also reinforce that = is not the equality operator.
>
> In a similar way, again due to Dijkstra, I tend to put extra space
> around low priority operators -- again to help the eye (or what's
> behind it) to parse the expression. E.g.
>
> a + b*c
>
> It took mankind more than 150 years to agree upon = as the sign for
> equality (it was only much later that it was concieved as a boolean
> operator). Kernighan & Ritchie did a lot of harm when they
> "designed" the syntax of C.
>
> Best regards,
> Michael
>
> _______________________________________________
> mailing list bluej-discuss at bluej.org
> To unsubscribe or change your preferences, go to
> http://lists.bluej.org/mailman/listinfo/bluej-discuss
>
>
>
More information about the bluej-discuss
mailing list