News for hackers. Stuff that matters.
Re:Twitter urges users to change passwords after computer 'g... by astura on Thursday May 03, 2018 @09:27PM (#16991510)
Yeah, exactly. This error shouldn't ever happen, period. All modern development tools give big fat warnings when you do this.
Re:Twitter urges users to change passwords after computer 'g... by FPGAhacker on Thursday May 03, 2018 @10:28PM (#16991779)
“Should” is a bad word. If you are basing a conclusion off of a “should,” you are skating on thin ice.
Re:Twitter urges users to change passwords after computer 'g... by icebraining on Friday May 04, 2018 @02:06AM (#16992526)
This is just one of the many reasons why I like Python.

    > if a = 3:
           ^
    SyntaxError: invalid syntax
Re:Twitter urges users to change passwords after computer 'g... by simias on Friday May 04, 2018 @04:29AM (#16993060)
Rust has an interesting take on that, it's not a syntax error to write "if a = 1 { ... }" but it'll fail to compile because the expression "a = true" returns nothing while "if" expects a boolean so it generates a type check error.

Of course a consequence of that is that you can't chained affectations (a = b = c) but it's probably a good compromise.

Re:Twitter urges users to change passwords after computer 'g... by skolemtotem on Friday May 04, 2018 @01:29PM (#16996388)
Well in Rust ypu couldn't have = return the new value in general anyway, because it's been moved. So even if chained assignment did work, it'd only work for copy types, and really, a feature that only saves half a dozen characters, on a fraction of the assignments you do, that can only be used a fraction of the time, doesn't seem worth it at all.
Re:Twitter urges users to change passwords after computer 'g... by mkagenius on Thursday May 03, 2018 @10:12PM (#16991720)
People (atleast me) ignore warnings quite often, they aren’t safe haven if you ask me.
Re:Twitter urges users to change passwords after computer 'g... by _sh on Thursday May 03, 2018 @11:33PM (#16992020)
Hey no problem, just add -Werror to your compiler flags (C/C++/Java) or '<TreatWarningsAsErrors>true</TreatWarningsAsErrors>' to your csproj (C#).
Re:Twitter urges users to change passwords after computer 'g... by kiallmacinnes on Friday May 04, 2018 @03:21AM (#16992789)
This! Treat every warning as a failure, ideally in your CI system so people can't forget, and this problem (ignoring warnings..) goes away.

You will have a better, more reliable, and safer codebase once you clean up the legacy mess and turn this on..

Re:Twitter urges users to change passwords after computer 'g... by acomjean on Friday May 04, 2018 @08:55AM (#16994188)
I agree. Having worked in a project with warnings as errors on (c++) I found it annoying at first but it made me a better coder in the long run.

Plus you get out of the habit of not reading output from the compiler because there are so many warnings...

Re:Twitter urges users to change passwords after computer 'g... by maljx on Friday May 04, 2018 @05:30AM (#16993274)
Unless you follow a zero warning policy they are almost useless. If you have a warning that should be ignored add a pragma disable to that file. Or disable that type of warning if it's too spammy for your project.