4 ms·
I like this take, I think it's more of a red flag that vigilance and discipline is a necessity. There must be strategies that minimise this. To take HN's fave
by benrutter 2y ago
I like this take, I think it's more of a red flag that vigilance and discipline is a necessity. There must be strategies that minimise this.
To take HN's fave example Rust: it has a type system that removes "viligance and dicipline" as a requirement for memory management. We don't need as much care if we can codify checks and standards that make bad practices (null pointers etc) impossible.
I work mostly in Python, and even using neat tools like Vulture, dead code elimination is a mostly manual, care-requiring task. I wonder if there's a neat way to bring down excess code- I don't have any new ideas though.
- zozbot234 2y ago> To take HN's fave example Rust: it has a type system that removes "viligance and dicipline" as a requirement for memory management. Nope, it doesn't. That's what the 'unsafe' keyword means in Rust: it's just short for "vigilance and discipline required".
- benrutter 2y agoI'll grant you that, but I would argue that 'unsafe' is the exception, definitely not the rule. The fact that there's a required keyword sort of gets at what I was driving at.
- impulsivepuppet 2y agoI find it hard to believe that vigilance can be opted out of, unless—sarcastically speaking—you leave the company before the lack of vigilance becomes a problem. I somewhat agree with your take but that "free lunch" is paid by a disciplined use of lifetimes, somewhat contradicting the claim of "removing vigilance and discipline by using Rust's type system/borrow checker". In my worldview, type systems are in fact a compiler-enforced discipline, but I see how productivity can be boosted once problem areas become more visible / less implicit. Problems don't really disappear, they only become easier to scan through.
- LkpPo 2y agoDoes the quality of the paint and canvas prevent a poor painter from applying 30 coats? No, and it's probably the same with programming languages. Adding a low wall in the driveway won't change anything.