views:

213

answers:

3

I first came across exceptions with ADA 83. As far as I know, the designers of ADA invented the concept of exceptions. Is this true, or did any programming language that came before use exceptions too?

+3  A: 

According to c2.com's Ground Breaking Languages page it was PL/I.

chaos
There was a lot of good stuff in that language. Pity about how it all worked together.
David Thornley
Note: this was my answer to the question about what language *exception handling* first appeared in, which was merged with this question, IMO inappropriately.
chaos
I've changed the question to the one you answered chaos. I tried to just delete it and start again, but even as the question asker, I'm only allowed to vote to delete my own question. This place has changed a lot since I was last here.
David Arno
A: 

From Wikipedia:

Generic programming facilities first appeared in the 1970s in languages like CLU and Ada, and were subsequently adopted by many object-based and object-oriented languages, including BETA, C++, D, Eiffel, Java, and DEC's now defunct Trellis-Owl language. Implementations of generics in languages such as Java and C# are formally based on the notion of parametricity, due to John C. Reynolds.

maxpower47
If you're going to copy and paste from Wikipedia, at least provide the source link.
Brandon
If you're going to straight copy from the Wiki page, at least cite it.
Jason
Hey, he ripped that off!
skaffman
I'm confused, even before the edit he put "From wikipedia", what's the problem?
John Rasch
No, he didn't. He edited it after the fact, it just doesn't show the revision. Either way he did add it very quickly after the fact, so there is no problem.
Brandon
@John Rasch: He had a stealth edit before the first five minutes where he added the "From Wikipedia".
Jason
+2  A: 

It depends on how you define generics. Parametric polymorphism - which allows you to define functions and types that are not tied to particular argument / field types - was there in ML already - and that's 1973. There is a Standard ML sample from Wikipedia:

fun reverse [] = []
  | reverse (x::xs) = (reverse xs) @ [x]

Note that this function is statically typed, but polymorphic ("generic") on any type of list.

While this example is SML (which is a later thing), so far as I know, the concept was present in earliest ML versions as well.

Pavel Minaev
All folk, please note: this answer was to a related question (in which language did generics first appear) which unfortunately got merged with this one by an over-enthusiastic admin. It's not Pavel's fault it's not an answer to this question, so please do not down-vote him for it.
David Arno