4 ms·
I was surprised by the statement since I use Swift mostly as a functional programming language. Sure you need to avoid classes and restrict yourself to value ty
by jdmoreira 6y ago
I was surprised by the statement since I use Swift mostly as a functional programming language. Sure you need to avoid classes and restrict yourself to value types but I enjoy the syntax.
Immutability is guaranteed, closure syntax is not that clunky, the type system is great, extensions are amazing for namespacing and protocols / generics solve all my polymorphism needs.
The language is huge though and getting bigger (which I don’t enjoy).
- zepto 6y agoI like Swift more than any other curly brace language, and I use it for functional programming. I have pure Swift apps in the App Store and continue to work on Swift projects. But compared to something like OCaml or Haskell, the syntax is just plain nasty for real fp. It feels clumsy and verbose - like wearing a pair of hob-nail boots for ballet dancing. However, I think they made a good trade off in terms of balancing readability, power and progressive disclosure.
- johnnycerberus 6y agoI wouldn't call OCaml or Haskell languages with nice syntax either. Are they powerful? Yes, but the syntax is not very appealing.