News for hackers. Stuff that matters.
Re:Notes on a Smaller Rust by skohan on Thursday July 18, 2019 @12:25PM (#20471423)
Yeah I know, but there's a wide range of languages which are neither C nor Rust.

My point is, there are plenty of examples of languages that show that you don't need to add semicolons to almost every line of your program just to avoid this one potential error.

Re:Notes on a Smaller Rust by leshow on Thursday July 18, 2019 @04:06PM (#20473454)
Out of curiousity, which languages are you referring to? Assignment in if-statements is possible in C, C++, js, Go, and many other C-like languages.

I think the only language I know of that disallows assignment in them is python, and it's not because assignment evaluates to something other than boolean, python is happen to evaluate the 'truthiness' of certain types. And funnily enough, they are going to add this back in to python 3 I believe, using a different operator.

Re:Notes on a Smaller Rust by skohan on Thursday July 18, 2019 @05:05PM (#20473913)
Swift, Kotlin, D, C# to name a few.

Are you sure about Go? I just tried this in an online playground, and I get this error:

    syntax error: assignment x = 2 used as value