News for hackers. Stuff that matters.
Re:The Repeated Deaths of OOP (2015) by jtdev on Sunday June 06, 2021 @10:08AM (#27413265)
From the Swift docs regarding closures (I would have used Haskell doc reference, but the Haskell docs are so esoteric and vague as to be nearly useless):

“A closure can capture constants and variables from the surrounding context in which it’s defined. The closure can then refer to and modify the values of those constants and variables from within its body, even if the original scope that defined the constants and variables no longer exists.”

https://docs.swift.org/swift-book/LanguageGuide/Closures.htm...

Re:The Repeated Deaths of OOP (2015) by ebingdom on Sunday June 06, 2021 @10:29AM (#27413421)
> From the Swift docs regarding closures

What makes you think Swift only supports functional programming?

> I would have used Haskell doc reference

And if you would have, you would have disproved your own point. In Haskell, closures cannot mutate state, because mutable state is not part of the language semantics. It's modeled explicitly via monads.

Re:The Repeated Deaths of OOP (2015) by valenterry on Sunday June 06, 2021 @10:29AM (#27413416)
Swift is not a language that enforces code to be pure functional though.
Re:The Repeated Deaths of OOP (2015) by jtdev on Sunday June 06, 2021 @04:20PM (#27415975)
FP = debating largely academic nuances that have almost zero material effect on software deliverables, purely for ego driven reasons.