|
![](/i/fill.gif) |
On 18-11-2009 11:35, Invisible wrote:
>>> (I know some people use the triple-line symbol for this though.)
>>>
>>> The main confusion is between assignment and equality, generally.
>>
>> That is why most languages have separate symbols for both meanings
>> (and why I am advocating imperative languages without assignment).
>
> Heh. How many C programs fail because people use "=" instead of "=="?
>
> (Most strongly-typed languages manage to catch this mistake. C is
> deliberately designed to make this mistake a valid program construct.
> Friggin' weirdos...)
No, if they did it differently it would break other functionality.
>>> Or, in mathematics, between a test for equality and a statement of
>>> equality.
>>
>> Can you give an example of that?
>
> If I say "x = sqrt(y/z)", do I mean that x *is* equal to this RHS? Or is
> it an equation that must be solved by *making* x equal to the RHS?
Or is it the definition of z because x and y are known.
And there is still the other interpretation of being false everywhere in
3D space except on some curves planes.
> Similarly, this fragment can appear inside a statement, such as "f(x) =
> 3 if x = sqrt(y/z), otherwise 9". In that case, the "x = sqrt(y/z)" part
> is clearly a conditional test.
I don't remember 'if' being part of my maths course. Yet yhere must be
specialized subfields where it is defined.
Post a reply to this message
|
![](/i/fill.gif) |