Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What other programming languages have a Smalltalk-like message-passing syntax?

Tags:

What languages are there with a message-passing syntax similar to Smalltalk's? Objective-C is the only one I'm familiar with. Specifically, I was wondering if any other language implementations exist which allow for syntax in a form like: [anObject methodWithParam:aParam andParam:anotherParam], having messages that allow for named parameters as part of method definitions.

In general I find that this syntax can be conducive to more consistent method names that more clearly show the methods' intent, and that the price you pay in wordiness is generally worth it. I would love to know if there are any other languages that support this.

like image 998
donalbain Avatar asked May 26 '11 21:05

donalbain


People also ask

Is Ruby like Smalltalk?

Ruby borrows OOP from Smalltalk, but otherwise is a very much different language. I'm going to argue that Smalltalk is still technically a better choice than Ruby. Ruby appeals to programmers because of its clean, simpler syntax. However, Smalltalk is the ultimate in clean, simple, and minimalist.

Is Smalltalk a programming language?

Smalltalk is a "pure" object-oriented programming language, meaning that, unlike C++ and Java, there is no difference between values which are objects and values which are primitive types.

What programming paradigm is Smalltalk?

It should feel familiar, because Smalltalk's implementation of the object-oriented (OO) paradigm is so excellent that it has influenced an entire generation of OO languages, such as Objective-C, Python, Ruby, CLOS, PHP 5, Perl 6, Erlang, Groovy, Scala, Dart, Swift, and so on.

What is Smalltalk in Java?

Smalltalk do not have a syntax. Instead it has a simple, consistent format for sending messages. Java, like other languages of the C family, has a complex syntax. Environment. Most Smalltalk implementations provide a complete, standalone, live computing environment with image based persistence.


2 Answers

Here is a list of languages supporting keyword messages syntax similar to Smalltalk:

  • Objective-J, Objective-Modula-2. These are language extensions similar to Objective-C.
  • Strongtalk, a Smalltalk dialect with optional strong-typing
  • F-script, an embeddable Smalltalk dialect with APL-inspired array operations extensions.
  • Self
  • Newspeak
  • Slate
  • Atomo, an embeddable language for Haskell
like image 181
Nekuromento Avatar answered Sep 27 '22 21:09

Nekuromento


In addition to the other languages mentioned here, Fancy:

osna = City new: "Osnabrück" p = Person new: "Christopher" age: 23 city: osna p println  berlin = City new: "Berlin" p go_to: berlin p println 
like image 33
munificent Avatar answered Sep 27 '22 20:09

munificent