News for hackers. Stuff that matters.
Re:Worst Bug Ever by fosap on Monday January 21, 2013 @11:36AM (#5092168)
>It's not really mutable, because it isn't a variable. However, if there is a variable by that name, Matlab will use it instead of the complex constant.

This is what i mean with a sort of special syntax. It's awful corner case.

I don't like the Python syntax either. What would be wrong with Math.C(1,1) for 1+i? Or how about 1 + Math.I ?

Re:Worst Bug Ever by potatolicious on Monday January 21, 2013 @12:09PM (#5092339)
The idea is expressivity - your solution seems boilerplatey and doesn't scale to longer expressions. The idea is to make math expressions as easy to write (and read) as it would be on paper, or at least get as close to it as possible.

I don't have a problem with using i or j as the complex constant, as long as the necessary sanity checks exist to make sure it's not misused (e.g., duplicate declaration of i/j, overwriting i/j, etc).

Re:Worst Bug Ever by andreasvc on Monday January 21, 2013 @12:11PM (#5092356)
Well it is more verbose which matters if you do a lot of complex math. IMHO i, j, l should be avoided as variables anyway, as they are too similar visually; I prefer a, b, c & n, m for loop variables and indices.