Why is smalltalk not a functional programming language?

后端 未结 9 1666
太阳男子
太阳男子 2020-12-13 20:08

With the renewed interest in functional programming languages, I\'ve seen some similitudes between Smalltalk and FPL, namely closures ( BlockClosures in Smalltalk ) Yet, Sm

9条回答
  •  时光说笑
    2020-12-13 20:51

    There's no accepted definition of functional programming language.

    If you define functional language as the language that supports first class functions, then yes, Smalltalk *is* a functional language.

    If you also consider the factors like support for immutability, algebraic data types, pattern matching, partial application etc then no, Smalltalk *is not* a functional language.


    I'd encourage you to read the following related blog posts (and also the comments below them):

    • Scala is not a functional language

    • Erlang is not functional

    • Reddit discussion on "Erlang is not functional"

提交回复
热议问题