News for hackers. Stuff that matters.
Re:Statements vs. Expressions by lmm on Thursday July 14, 2022 @06:40AM (#32094216)
Some languages forbid "obviously pure" expressions like "0" as statements (since using them as a statement is probably a mistake).
Re:Statements vs. Expressions by hibbelig on Friday July 15, 2022 @09:37AM (#32108047)
I think I was saying that Javascript is not one of them.
Re:Statements vs. Expressions by mxben on Thursday July 14, 2022 @07:36AM (#32094591)
Interesting! Any examples of such languages?
Re:Statements vs. Expressions by lmm on Thursday July 14, 2022 @05:14PM (#32101542)
Java is one popular example. You get "error: not a statement".