• All these languages incorporated (over time for better or worse) some object-orientation.

    Objet-Orientation was actually introduced almost 40 years ago: putting the data (state/data structure) and function (behavior/operation/function) together into one definition, to ensure for good that not the wrong operation/function can be applied on the data (invoking a function / call with the wrong data...). Smalltalk is my favorite in that respect, because the first thing in every expression is the object reference that receives a message to do something, followed by a parameter, which is also an object reference. Smalltalk is also (almost the only language) in which classes are first-class objects, and the method new returns an instance of that class.

    | thisThing |
    thisThing := Something new.
    

    Smalltalk got also rid of the cluttering parentheses. In general, the code looks much more concise, but still very prosa. Class and method definitions look like this:

    Something subclass: /#Object
        "Defines 'Something' as subclass of class Object. --- PS: w/o /"
      name: ''   
    
    newWithName: aString
        "Class method that returns a new instance with name set"
      | aThing |
      aThing := Something new.
      aThing name: aString.
      ^ aThing
    
    name
        "Instance method that returns the name"
      ^ name
    
    name: aString
        "Instance method that sets the name"
      name := aString
    

    Smalltalk uses parenthesis only to enforce precedence.

    Regarding Object-Orientation: Take a look at the brilliant approach of using CRC-Cards - Class-Responsibility-Collaboration-Cards - to crack the OO-nut without going technical. It helps to break down a system into very suitable software components without the syntax clutter of a any language, and helps to think in encapsulated, real-world objects rather than a sequence of operations on a pile of data data types.

  • Smalltalk was in my TODO list (my list of languages to be learned) along with Elixir, Lua and Lisp =)

    Our learning survey is mainly motivated by our commercial applications' needs (we learn whatever we need to, or invent sometimes). For example I was forced to learn Python in order to program a Telit 863-PY GSM module, then I liked it very much =)

About

Avatar for allObjects @allObjects started