DEV Community

Discussion on: Which mainstream programming language has the ugliest syntax?

 
ryanhaber profile image
Ryan Haber

Yeah, but if I recall, the syntax made it redundant anyway, since Pascal wouldn't accept assignments in the middle of a logic evaluation, for instance, would it?

Thread Thread
 
antjanus profile image
Antonin J. (they/them)

I've no idea, I've never done any Pascal.

Thread Thread
 
arj profile image
arj

Correct, Pascal didn't allow assignments in expressions as an assignment was a statement and not an expression.

In C an assignment is an expression and thus it is allowed to be included into other expressions.

In Pascal though you never had trouble with this:

if (x = "command") {
   std::cout << x << std::end;
}