Profile picture
Jasim @jasim_ab
, 24 tweets, 7 min read Read on Twitter
Three views of object-oriented programming, Prof. Ralph Johnson (chara.cs.illinois.edu/sites/cs528/)
"When I was learning Smalltalk, Brian also used to complain about “Californian” programming — no types, dynamic dispatch, a relaxed interactive programming environment — much warmer, and much less bracing, than Oregon or Glasgow that gave birth to his beloved Haskell." -
That was from The Myths of Object-Orientation, James Noble. lambda-the-ultimate.org/node/4112.

C++ was the first mainstream language that intertwined types and classes, instead of having a type system orthogonal to objects. Stroustrup took this away from Simula, In HOPL II he says -
C++ (and in turn Simula) became the dominant model of object-orientation for a long time through Java and C#, than SmallTalk which was dynamic and was more about message passing than objects as types and hierarchies.
Pascal turned Stroustrup away from "types for data" (in OCaml classes aren't types but objects can be typed). But Pascal was written by Prof. Wirth to teach structured programming (GOTO considered harmful), and not for distributed systems simulation as Bjarne wanted.
Brian Kernighan goes into more detail why Pascal's type system was strait-jacketed (even worse than Java before 2004 without generics and lambdas) in "Why Pascal is Not My Favorite Programming Language". Link and sound discussion at news.ycombinator.com/item?id=8260694
This was all happening in the 1970s. Something else was also happening in the 70s - Milner released ML at University of Edinburgh, when for the first time in history of computing we got a sound and powerful type system and ease of inference.
But Stroustrup had already lighted the C++ revolution. It brought zero-cost abstractions to C and OO radically improved code organizations than C's procedural paradigm. And valid C was valid C++; considering C was in someways the Javascript of the time, it kick-started adoption.
The differences between ML and C++ was more deeper than just "types for data" vs "types are classes". ML (SML by then) was also a LISP in an ISWIM syntax. C++ was just ALGOL with C's sensibilities and Simula's classes.
ISWIM was "the language of future" imagined by Peter Landin in the classic "The Next 700 Programming Languages". It has offside indent and mathematical notation, found in typed FP languages like SML, OCaml, F#, Miranda, Hope, Haskell, Elm, and PureScript. cs.cmu.edu/~crary/819-f09…
Paul Graham in Beating Averages (paulgraham.com/avg.html) attributes Viaweb's success to LISP, macros and code-is-data. One thing he omitted is that LISP had a GC while C++ programmers had to manage memory manually when generating web pages.
Functional programming languages have always had a GC. And GC is common across every language that succeeded on the web, starting with Tcl, Perl, Java and the current favorites Ruby and Python. Rust is an exception, I wouldn't be surprised if they build a Rails alternative.
In fact some sort of automatic memory management existed across FORTRAN, COBOL, dBase, PowerBuilder, Clipper and other 4GL languages. Business applications have always favored iteration speed and human hours over machine hours.
The tangent about GC was prompted by this wonderful email "Why ML/OCaml are good for writing compilers" flint.cs.yale.edu/cs421/case-for… written in 1998, pointing to GC as a major reason. It is instructive in how we take things for granted irrespective of how novel it was at the time.
This brings me to the core of my thesis: this is very very early days for programming languages. What we take as status quo today - programming languages, paradigms, tools, and constraints - all of them are evolving; and the future is here, it is just not evenly distributed.
Remember Dijkstra's GOTO considered Harmful is only 50 years old. It took another 40 years for Out of the Tar Pit to tease out essential complexity from accidental complexity and convincingly call out State and Control Flow as the things that make software difficult.
Academia gets things right decades earlier than industry, and unfortunately industry adoption is all about random chance. We might have had a very different Java if Stroustrup had worked with Milner's group in Edinburgh instead of Cambridge in the same 10 year window.
Or if Brendan Eich chose to use a Lisp-y syntax for his 10-day language creation jaunt instead of ALGOL (he was asked by a joe from "marketing" to make things similar to Java).
The front-end programmers of the world would've had to use Angular if Jordan Walke hadn't fortuitously studied ML in the Univ. of Washington. reactiflux.com/transcripts/jo…
While randomness plays a big role, it can't be denied that languages are to a certain extent "designed" by their authors to fit certain ideals. They are after all a creative endeavor, far more creative and subjective than we'd like to believe. (DOI: 10.1007/s13347-016-0223-5)
If you're interested in object-oriented programming, I cannot recommend this paper enough: justinjoque.com/writings/the_i…. Justin argues that OO is philosophical - a way of looking at the world through the lens of an abstract "object". He quotes Alan Kay on Smalltalk:
However he immediately pokes holes in Kay's vision with this:
He follows that program design involves ontology, and while OO provides a mechanism for it, there still isn't a "one true way" to model any given problem. It depends on the subjective metaphors of the programmer, and the subjectivity of ontology itself.
But when taken to the extreme, this is as foolish as denying causation and citing Hume. existentialcomics.com/comic/212. There are better ways of modelling and worse ways of modelling. Not all spaghettis are created equal.
Missing some Tweet in this thread?
You can try to force a refresh.

Like this thread? Get email updates or save it to PDF!

Subscribe to Jasim
Profile picture

Get real-time email alerts when new unrolls are available from this author!

This content may be removed anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member and get exclusive features!

Premium member ($3.00/month or $30.00/year)

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!