RU beehive logo promo banner for Computing & Info Sciences
CS 380
2025spring
ibarland

Families of languages

Three things to consider, in a language:

The textbook also talks more broadly, about the costs associated with the choice of various languages.

Families of languages:

These are not mutually exclusive!

In class, we discussed the notable features of these families. And although we did associate various languages as notably-having some of these features, we also noted that saying a language being a member of a family/category is bunk -- rather, think of these as styles of programming, and say that (e.g.) "Racket notably supports functional-style (but certainly it also features an object system, and is also conducive to scripting tasks)".

At the end of class, the board looked like this (right-click to see in separate tab, full-size) (Photo credit eafzalzada@; thanks!)

There are a huge number of particular languages. We'll glance at poster: programming languages history (note the two earliest languages). You might want to browse, on your own, a language popularity index or a hello world collection.

Finally, it is true:

There are more things in heaven and earth, Horatio, Than are dreamt of in your philosophy. — Hamlet 1.5.184–185, Hamlet to Horatio
Less high-falutin’,
Now there's more things in Tennessee than is dreamed of in your philosophy -- The Cramps, Cornfed Dames
See also: A Brief, Incomplete, and Mostly Wrong History of Programming Languages.

Racket: tools to build your own languages

We mentioned that the racket developers consider racket not just a modern scheme, but rather a tool-system for easily designing your own languages. Those languages may not look like racket at all, but can be internally translated w/o too much work, such as demo'd by www.hashcollision.org/brainfudge/.

#lang planet dyoo/bf
++++++[>++++++++++++<-]>.
>++++++++++[>++++++++++<-]>+.
+++++++..+++.>++++[>+++++++++++<-]>.
<+++[>----<-]>.<<<<<+++[>+++++<-]>.
>>.+++.------.--------.>>+.

A good list of 10 influential, if (mostly) dead, programming langauges

Silly Languages

In addition to Brainfudge/Brainf*ck and its sillier cousin en.wikipedia.org/wiki/Whitespace_(programming_language), there are plenty of other silly languages people have come up with, such as Befunge (2-D "follow the pointer" language), https://codewithrockstar.com/online?source=/rockstar/examples/99_beers.rock (can read like 80s power-ballads) as well as more standard languages which use silly keywords, like emojicode, and lhartikk.github.io/ArnoldC/ (where keywords are Arnold Schwarzengger catchphrases). The language we'll write in the last 4weeks of this course are like the latter.

Other/previous notes

I may have mentioned some of the things below during lecture, but certainly not all of them.
  What are various languages you've used?





These categories are (a) very blurry; (b) not informative -- not the fundamental building blocks of language-features.


low-level -- understading the language's semantics requires knowledge of the hardware it runs on.
  C ("high-level assembly"),
   assembly

Procedural: organize code in procedures (like functions/methods, but may have side-effects and not return values)
Organization based on *functions* that get passed data (cf. O.O.)
  Ada - lots of safety features (and, requirements)


scripting: easy to work with files, OS calls, manipulate strings and I/O; glue together parts of other large projects
    perl, python, javascript, php
    ruby -- everything is an object, e.g. 3.plus(4)
    javascript -- uses instance-based inheritance, not class-based inheritance

object-oriented:   objects; inheritance (allows code re-use and code specialization)
                              you don't "call a function", you do "message passing" --
                              give an object a method (that is, request it to do something)
Organization based on *objects* that are asked to perform their actions(methods) (cf. Procedural)
                        Digression/detailed-preview: I have a videogame two functions
                        "damage-dealt-when-attacking" and "damage-dealt-when-defending".
                        I could combine these into a single "damage-dealt", where I also pass
                        the one of the two specific strings {"attacking","defending"}.
                        This'd work even if there were "damage-dealt-when-retreating";
                        there'd just be a big conditional based on which string was provided.
                        [Or I could use a hash-table to map the string to the right code to jump to, internally.]
                        …In fact, I could combine any 20 functions into one, and just pass along
                        string naming the "real" function (and perhaps all the other arguments as
                        one big List<Object>).
                        Well, in that case, the string is the "message" that we're passing.
                        O.O. just does that by having the dispatch being done in code associated
                        with the object/class, and thus there are only (say) 20 valid method-names.


    Smalltalk -- first O.O. lang;
    Java,  C++,  C#, Alice -- has some primitive types that are not objects (e.g. int, double, boolean, char)

functional: organize code into pure functions (no side-effects, always *return* value)
                 (If you give the same function the same inputs later, you MUST get the same answer.)
                 No mutation -- don't change variables or fields.
                 higher-order functions: can pass a function as an input, to be (used by) other functions!  ...Can create new functions that didn't exist at compile-time.
                 Tends to have lots of small functions (only a few lines long).
   Lisp (1965 -- 2nd oldest language in use, after Fortran);
                 evolved to Scheme (a streamlined lisp),
                 scheme evolved into racket (an industrial-strength scheme)
   racket, F#
   Haskell -- *pure* functional; lazy (and, very very abstract).

Declarative language -- your program gives the defining properties of the solution, but NOT how to find it.
                                      (don't talk about loops, or variables, or updates; talk about *specifying* the result.)
    Prolog
    SQL, Excel

high-level domain-specific language:
   Mathematica, MatLab

html, markup:
    They are data -- not languages.


Side-effect: making a change that can be seen elsehwere.
 Examples: setting global variables; e.g. current-time-of-day; and I/O.

A history overview

name  yr  family  feature(s)/notables  (descendents/related)  example
TM, lambda calculus
machine / hardware switches (incl. Babbage's Analytic Engine)
assembly
Lisp; Scheme, ML, Haskel, F#
Fortran; PL/I; Algol;
SmallTalk; C++, java, C#
Ada;
sh, csh, Tcl/Tk, perl, python, ruby
rpn; postscript (printer is the interpreter; req'd M68000, not 8088,6502); pdf
prolog (Japanese "4th wave")
Basic (Apple II ROM; line#s; goto;'gosub' but no params (only globals) (recursion?!)),
   http://www.jenutech.com/images/HomeSweetGoto10.gif
   http://theinfosphere.org/File:Gotohell.jpg
Pascal (teaching; nested procedures)

- examples: enscript -o foo.ps (wimpout.ps) Example: enscript -o foo.ps ; cat foo.ps ; open foo.ps Example: cat wimpoutBoard.ps ; open wimpoutBoard.ps also, sh: Example: cd ~/Unix find . -name \*.ps -print find . -name \*.ps -print | grep -i wimpout - other notables: * postscript - C, Ada, Fortran, Pascal, Rexx, ... - Smalltalk, Java, C++, C#, ... - APL; Mathematica; Matlab - javascript, perl, etc; html ? -- no; data. But, .css. - sh/csh, .bat, applescript; scriptable photoshop? Example: cd ~/Unix find \*.ps find \*.ps | grep -i wimpout Note that we are calling functions. (How are arguments passed?) - a *programmable* calculator. * MS Word "macros" and mailing-list scripts - abacus-instructions ? - brainfudge: https://www.hashcollision.org/brainfudge/ There are more things in heaven and earth, Horatio, Than are dreamt of in your philosophy. — Hamlet 1.5.184–185, Hamlet to Horatio Now there's more things in Tennessee than is dreamed of in your philosophy -- The Cramps, Cornfed Dames https://www.hashcollision.org/brainfudge/ : #(struct:cdata #(struct:location 249 0 9565) #(struct:location 256 3 9756) <![CDATA[ #lang planet dyoo/bf ++++++[>++++++++++++<-]>. >++++++++++[>++++++++++<-]>+. +++++++..+++.>++++[>+++++++++++<-]>. <+++[>----<-]>.<<<<<+++[>+++++<-]>. >>.+++.------.--------.>>+. ]]>)

Link: A Brief, Totally Accurate History of Programming Languages


logo for creative commons by-attribution license
This page licensed CC-BY 4.0 Ian Barland
Page last generated
Please mail any suggestions
(incl. typos, broken links)
to ibarlandradford.edu
Rendered by Racket.