News for hackers. Stuff that matters.
Re:D Programming Language by abbbyz on Thursday February 12, 2026 @02:55AM (#46986022)
>one of the biggest flaws of OOP is that if x.foo() calls x.bar() in the middle, x.bar() can clobber a lot of local state, and result in code that's very difficult to reason about

That's more a problem of having mutable references, you'd have the same problem in a procedural language.

Re:D Programming Language by torginus on Friday February 13, 2026 @02:47AM (#47000048)
Very few OO languages track reference mutability with any level of rigor. In C/C++ most devs don't even know what restrict is or how to write code using it correctly (which is very difficult an bug prone), const is unfortunately not enough.

In fact I don't even know of any production language that handles variable mutability with any rigor other than Rust.