Re: The IDS, the EDS and the DBMS

From: Marshall Spight <mspight_at_dnai.com>
Date: Tue, 14 Sep 2004 15:45:28 GMT
Message-ID: <smE1d.191531$Fg5.135648_at_attbi_s53>


"Lemming" <thiswillbounce_at_bumblbee.demon.co.uk> wrote in message news:nvbdk015210eubjql83vdif0oim3fbv3g2_at_4ax.com...
> I feel that embedding assignments in other expressions leads to a lack
> of clarity in the code. I can see though that leaving aside my own
> preference, having different operators for assignment and comparison
> does confer this ability. If a and b are both booleans, then the
> statement:
>
> if (a = b) then ...
>
> would be ambiguous whereas:
>
> if (a := b) then ...
>
> would not.
>
> I still feel though that even the second example could lead to
> confusion, being misread by a human as a comparison rather as an
> assignment. I feel it's clearer to separate the statements:

My feeling is that if that kind of thing leads to confusion, don't do it. Disallowing it in the language adds a lot of complexity. I would rather use a language that didn't draw a distinction between statements and expressions; everything should be an expression. It's much more regular that way.

Marshall Received on Tue Sep 14 2004 - 17:45:28 CEST

Original text of this message