Hacker News new | ask | show | jobs
by int_19h 3262 days ago
I think you overestimate the readability of C-based syntax in general. A human that has no programming experience would have to start with parsing what !== means (and it's not at all obvious that ! is negation, or why = is doubled), and then move onto &&, although that's slightly more obvious. Nor is "int" obvious as a shortening of "integer" outside of CS - I've seen people interpret it as "internal", for example.

Going further, to even figure out why you need to do all this, that human would need to know such concepts as variables, data types, and nullability. The notion that variables can have designated types is a pretty obvious takeaway from the first two.

1 comments

Just for fun, if you didn't know what "?int $var = null;" meant, how would you explain that to someone verbally, or better [like most programmers would] how would you search for this online?

Finding the definition of "!==" is easy, simply searching that [including quotes] gives me the answer. Looking for something like "?int =" just gives me useless responses upon first glance.