Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is smalltalk not a functional programming language?

Tags:

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?

like image 295
OscarRyz Avatar asked Aug 20 '10 02:08

OscarRyz


People also ask

What type of programming language is Smalltalk?

Smalltalk is an object-oriented programming (OOP) language that incorporates dynamic runtime typing methodology and maneuverability.

Why is Smalltalk not popular?

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.

Why is Lisp not purely functional?

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.

Why Python is not a functional language?

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.

What is the difference between Smalltalk and functional programming?

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).

What is the difference between Python and Smalltalk?

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.

What type of language is Smalltalk?

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,...

Is Smalltalk still relevant today?

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.


1 Answers

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):

like image 52
missingfaktor Avatar answered Oct 13 '22 09:10

missingfaktor