News for hackers. Stuff that matters.
Re:Rise of Kotlin: A Programming Language for the Next Gener... by repolfx on Saturday July 07, 2018 @06:41AM (#17477956)
Google doesn't avoid RAII, they just avoid exceptions.
Re:Rise of Kotlin: A Programming Language for the Next Gener... by erik_seaberg on Saturday July 07, 2018 @08:26PM (#17481449)
The beauty of RAII is that every resource is tied to the lifetime of an object, and every object is always in a usable state. Having to call extra open/close methods and check error codes breaks these invariants, and leads to objects with bad fidelity to the normal copy and move semantics the language is built on.