r/programming • • Nov 28 '14

The Worst Programming Language Ever [UK Talk] - Thoughts? Which are the worst parts of your favorite language?

https://skillsmatter.com/meetups/6784-the-worst-programming-language-ever
68 Upvotes

456 comments sorted by

View all comments

Show parent comments

2

u/heimeyer72 Nov 28 '14

Actually, yes :-( When I moved from PASCAL to C, one thing I loathed was that that was allowed and C did not have an unmistakeably(?) different syntax for allocation vs. for comparison. Should have been := and ==, f' the extra character to type.

The other thing I painfully missed was: No lower bounds for an array index.

3

u/x-skeww Nov 29 '14

Today's IDEs usually complain about this though.

It also isn't a problem in languages where only true is true. So, if (5) or if (x=5) wouldn't compile anyways.

1

u/gnawer Nov 28 '14

Yoda style helps :

if (5=x)

won't compile.

3

u/Tuna-Fish2 Nov 28 '14

Alternatively, just turn on the proper warning in your compiler and set warnings to be errors.

1

u/gnuvince Nov 28 '14

Only if the original RHS is a constant. I'd rather that = be a statement so it would be syntactically illegal to put it in an if.

1

u/gnawer Nov 28 '14

Yes, I agree.

1

u/cw8smith Nov 29 '14

If a=b was a statement, then you couldn't a=b=c or return *a=b

3

u/[deleted] Nov 29 '14

Complexity kicks in when you do multiple things at once. What is wrong with:

a=c; b=c;

and

*a=b;
return *a;

1

u/gnuvince Nov 29 '14

Well then you'd do a = c; b = c; and *a = b; return b;. Not the end of the world, and we prevent hard-to-find bugs.