News for hackers. Stuff that matters.
Re:Functional programming is finally going mainstream by LAC-Tech on Wednesday July 13, 2022 @04:42PM (#32088488)
There's no law stopping you returning a new object from a method outside the builder pattern.

Immutable objects are a pretty old idea, smalltalk had select (map) methods that returned a whole new collection back in the 80s.

Re:Functional programming is finally going mainstream by stickfigure on Wednesday July 13, 2022 @07:55PM (#32090233)
...and in fact most strings in OOP languages work like this:

    String next = original.substring(2);