views:

272

answers:

5

Programming has come a long way. I am still relatively young (first Computer: C64), hence I take many things in programming for granted that were obviously introduced at some point and facilitated ways of programming that are now commonplace.

What follows is a (by no means complete) list of features, where I would love to know in which language and when they were introduced:

  • introduction of functions
  • compiled language
  • interpreted language
  • conditional & loop structures
  • the array
  • the dictionary (Hashtable)
  • allowance of multi-threading
  • functional programming (functions as data)
  • object orientation (do we need to be more specific? maybe inheritance was there earlier than interfaces?)
  • generics
  • aspect-oriented programming
  • meta-programming

If you can, try to back up your statement with some reference. If you feel I have missed an important programming language feature whose introduction should also be appreciated, please comment on this question such that it can be added to the list.

UPDATE: I suppose that a programming language cannot introduce anything that wouldn't be possible in assembler, I'm rather looking for languages that made a certain feature available to "mere mortals".

+1  A: 

You could use a language graph here: http://www.levenez.com/lang/ and Wikipedia to find answers. For starters: functions, loops and conditionals are with us since Fortran. And then, in 1958 Lisp arrived, I think some will argue that the rest came then :)

wuub
Nice chart. That's gonna go on my wall here in the office :)
flq
A: 

I think we can safely say "assembler". Most if not all of these concepts have been around for a very long time.

anon
Assembler does not have any of these features!
finnw
The question was when were these features introduced. And they were introduced in assembler programs in the 1950s.
anon
Object orientation? Meta programming? Generics? I don't think you can say any of these applied (or currently do apply) to assembler.
Noldorin
Well, I was certainly writing OO code in assembler in the late 70s. Generics - assemblers have powerful macros (more like LISP macros than C) for this. Meta-programming - ever heard of self-modiying code?
anon
Indeed, you're right about meta-programming. I'm still very doubtful about OOP and generics in Assembly however.
Noldorin
Polymorphism (aka OOP) has always been used in assembler, in the form of pointers jump tables. There was a huge discussion on comp.object about this a while back.
anon
deffo. If the ptr is not polymorphism at its core I don't know what is.
Preet Sangha
There doesn't even exist a concept of objects/classes/types in assembler, let alone inheritance. These things are at the core of OOP in my view.
Noldorin
+8  A: 

Lisp. 1958.

Alternatively,

  • introduction of functions - Alonzo Church's lambda calculus, 1930

  • compiled language - Grace Hopper, 1952

  • interpreted language - Lisp, 1958, maybe something before.

  • conditional & loop structures - Bletchley Park Bombe 1940s ( ran in a loop ). Jacquard, 1801

  • the array - as a contiguous chunk of memory with an index, Bletchley Park or Manchester Baby, 1940s

  • the dictionary (Hashtable) - ?

  • allowance of multi-threading - Jacquard, 1801; Multix 1965

  • functional programming (functions as data) - Godel, 1930s

  • object orientation

    • Simula ( Dahl and Nygaard 1967 ) for class based OO with inheritance
    • CLU ( Liskov 1975 ) iterators had a common interface, and allowed abstract data types with encapsulated state and behaviour
    • Smalltalk ( Kay late 1970s ) 'everything is an object'
    • Eifell ( Meyer 1986 ) design by contract influenced Java's interfaces
  • generics - generic methods ( Lisp again ) or parametric types ( modula??? )?

  • aspect-oriented programming - common lisp meta-object protocol, late 1980s

  • meta-programming - lisp macros, sometime in the 50s or 60s

Pete Kirkham
That Jacquard joke is brilliant!
Jörg W Mittag
Just two minor quibbles: there is no such thing as a compiled language or an interpreted language. Whether someone uses a compiler or an interpreter to implement a language is an internal implementation detail of that specific language implementation and has nothing whatsoever to do with that language. Case in point: the vast majority of Lisp implementations are actually compiled.
Jörg W Mittag
@Jorg: You have a fair point, but I think the terms are still valid. According to the oracle Wikipedia, there are too: http://en.wikipedia.org/wiki/Compiled_language and http://en.wikipedia.org/wiki/Interpreted_language
Noldorin
I'd remove SmallTalk. Simula was clearly the first, and defined the word "class".
John Saunders
+1  A: 

Finding firsts always leads to hair splitting. I'll bet any of the things you mentioned were done several times over before they hit the big time. Nonetheless, here's an attempt:

  • functions -- FORTRAN, but not recursive. LISP or Algol for recursion.
  • compiled language -- FORTRAN
  • interpreted language -- LISP
  • conditional and loop structures -- FORTRAN, but Algol gave us structure programming
  • the array -- FORTRAN
  • the dictionary -- Snobol, I think
  • allowance of multi-threading -- PL/I
  • functional programming -- LISP but perhaps not in a strong sense.
  • object orientation -- Simula but Smalltalk was the real popularizer
  • generics -- dunno
  • aspect-oriented -- dunno
  • meta-programming -- perhaps C++, but then code generating code isn't a new idea
George Phillips
+4  A: 

To the best of my knowledge (and with the help of Wikipedia), I would state the following:

  • Functions - Early Assembly, using instructions such as "jump to subroutine".
  • Compiled language - Arguably A-0 in 1952 or [FORTRAN](http://en.wikipedia.org/wiki/FORTRAN in 1957.
  • Interpreted language - Smalltalk (?) in the 1970s.
  • Conditional & Loop structures - Early Assembly, using branches/jumps.
  • Arrays - Used in the very earliest computers (1940s). Appeared as a language feature in FORTRAN. See this text.
  • Hashtable - Around the same time as arrays, since it only really uses a basic algorithm on top of an array data structure. As a class, perhaps Dictionary in Smalltalk.
  • Multi-threading - This is moreover a feature of the operating system/a library, though language features can of course facilitate multithreaded coding. It probably dates back to the 1960s/1970s, though, and I'd imagine it could be done in Assemby.
  • Functional programming - LISP in the 1950s, inspired by Alan Turing's lambda calculus.
  • Object orientation (OOP) - Simula in the 1960s.
  • Generics - CLU in the 1970s.
  • Aspect-oriented programming - Perhaps AspectJ in 2001. (Someone may need to correct me on this.)
  • Meta-programming - Early Assembly, with self-modifying code.

Please feel free to modify/update this with any additional information.

Noldorin
anon
The first interpreted language was probably Lisp, with BASIC in the mid-sixties also earlier than Smalltalk.
starblue
The earliest hashtable which could be considered part of the language (as opposed to implemented by the user) might be Smalltalk's Dictionary class.
starblue
@starblue: You're quite possibly right, but do you have any sources for that?
Noldorin