With the renewed interest in functional programming languages, I've seen some similitudes between Smalltalk and FPL, namely closures ( BlockClosures in Smalltalk ) Yet, Smalltalk is not a FPL?
What would be needed to consider it as such?
Smalltalk is an object-oriented programming (OOP) language that incorporates dynamic runtime typing methodology and maneuverability.
Smalltalk is perceived as a market failure. Smalltalk is perceived as having dim prospects for the future and thus not worth investing time and energy in it. It is most difficult to fight bad PR, but I shall try. Smalltalk is a language that has evolved carefully over the years.
Strictly speaking, Lisp is a functional programming language; that is, functions are first-class objects in Lisp. However, it is not a pure-functional language such as Haskell, because operations in Lisp can have side-effects. In CommonLisp, classes and methods are also first-class objects.
Python doesn't have built in support for efficient manipulation of immutable structures as far as I know. That's one large knock against it, as immutability can be considered a strong aspect of FP. It also doesn't support tail-call optimization, which can be a problem when dealing with recursive solutions.
Smalltalk is a purely Object Oriented Language, where almost all code is basically objects interchanging messages. Functional programming is oriented to function calls, and compositions between functions to create more complex behavior (avoiding state for data, as opposed to internal states that objects have in any Object Oriented language).
Again, Python is a general-purpose programming language most praised for its elegant syntax alongside readable code. That makes Python the best language for those just beginning their programming career. By contrast, Smalltalk stands out as an object-oriented, dynamically typed, and reflective language.
Smalltalk is an object-oriented, dynamically typed reflective programming language. Smalltalk was created as the language underpinning the "new world" of computing exemplified by "human–computer symbiosis". It was designed and created in part for educational use, specifically for constructionist learning,...
Smalltalk becomes more relevant if you want to teach children or introduce new people to programming. You may think that Python or JavaScript is friendly; Smalltalk is much better because it doesn’t carry the baggage found in the languages above, which might distract beginners.
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):
Erlang is not functional
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With