News for hackers. Stuff that matters.
Re:I am a horse in the land of booleans by zwkrt on Saturday August 10, 2019 @01:49PM (#20663490)
If your control structures are expressions then they can lead to code that the maintainers of the language might not want to promote. Remember that language design is not just about being as flexible as possible. If it were we would have stopped with Lisp. Languages are also designed with readability, portability, and simplicity in mind.

Imagine if you could write this (nonsense) code in Java:

bool a = (while (b) { if (c) { b=d;} else { b=e; }});

While it is efficient, some may balk at how “implicit” it is.

Re:I am a horse in the land of booleans by ACow_Adonis on Saturday August 10, 2019 @08:59PM (#20665533)
Of course I'd say this as a lisper, but as long as the return values of everything is intuitive and well defined, I don't see an inherent problem with such form.

Indeed, if anything, if the intention is to communicate that the Boolean value is the result of some process that runs through a while loop, then explicitly saying that in the assignment seems to me to almost be the best way to do it :\

ymmv.

Now deeply nested while/assignment/ifs, that's a bad-pattern, but I'm not inherently convinced that's an expression/statement problem.

Re:I am a horse in the land of booleans by yogthos on Saturday August 10, 2019 @07:22PM (#20665144)
I've worked extensively with both Java and Clojure, and the latter is far easier to read in my experience.