Perhaps you are aware of who Alan Kay, Bret Victor, Ian etc are, but... anyway, I just wanted to chip in with some context for those who are not aware. Alan Kay led the creation and development of Smalltalk at Xerox PARC, thus creating the first real GUI introducing all the UX elements we today take for granted (windows, buttons etc - yes, the same that Steve Jobs got a demo of), establishing OOP (some would argue Simula was first, but Smalltalk took it 10x further) and much, much more. So his legacy in the world of computing is... legendary I would argue, just google him.
Now, Ian has done truly brilliant VM JIT work in the Smalltalk community and I suspect that Ian did a lot of the DSL related stuff in STEPS, like the TCPIP stack etc.
So this is not just some "random folks" :) and.. some of the most brilliant work comes when you are really not sure where you are going. The original Smalltalk work that gave us OOP and modern GUIs came from Alan's life long task of making computers usable by children in order to amplify education. Most would argue we are still struggling with that task ;) but at least we got a lot of other things out of it!
...and then I met Joe not long after and we also discussed this in fact. He then told me that he felt my article was fair (!) and that he had *changed his opinion on OO since writing that article*.
IIRC his exact words were something along the lines of "I did not understand OO when I wrote that article". Now... he also argued Erlang is in fact VERY OO, and in some ways he is correct, since its very focused around autonomous "parts" communicating solely via messages.
Finally, I haven't read all 162 comments here - but OO is not "bad" nor "the holy graal". There are different ways of doing programming, and its as simple as that. I can find joy in simple imperative coding as much as I can long for the days I was working in pure OO in Smalltalk. :)
> Finally, I haven't read all 162 comments here - but OO is not "bad" nor "the holy graal". There are different ways of doing programming, and its as simple as that
What are we programmers supposed to do with all of our free-time unless argue about what is the holy grail versus which is not?! I feel so empty.
Jokes aside, I think this is the most important point really. There is no single language/paradigm that works best for everything, it all really depends on the context, environment, and so much more. It's easy to forget on the internet, that someones environment might be vastly different than yours, and think your solution will work for others because you miss their context.
OOP is hated all around the world, and still solves problems. Functional programming is loved all around the world, but is still not the right solution for everything.
Strangely a lot of the functional programming advocates are fine with closures, which are guilty of all the same issues -- private state, hidden state, combining data with functions. Closures are basically lightweight objects. Really the debate should be about whether you are dealing with pure objects or not, rather than whether you are binding code and data into a single variable that is passed around.
I once saw a python function that returned two other functions, a, b, such that depending on what was passed to a, the return value of b would change. Sounds terrible, right? Well, A was set_test_parameters(params) and B was get_test_results(test_run).
In OO parlance, they were two methods of the same test_ object but because they were returned as closures the underlying object was hidden as an internal variable in the function that returned a and b. In OO parlance that would be a factory. Wonder what Joe Armstrong would think about that -- it was both cringeworthy and also quite efficient, as the code that consumed A didn't need to know about B and vice versa. One could even think of A and B as two ends of a pipe, or as pointers to inputs and outputs of an unspecified function.
Being able to cleanly design a complex program so accurately that only immutable types are used is difficult. Then throw in large numbers of junior engineers working in tight time windows, subject to constantly changing requirements, and the odds of that codebase being pure a few years out is basically zero. In the end, we have to ship.
"""
The venerable master Qc Na was walking with his student, Anton. Hoping to prompt the master into a discussion, Anton said "Master, I have heard that objects are a very good thing - is this true?" Qc Na looked pityingly at his student and replied, "Foolish pupil - objects are merely a poor man's closures."
Chastised, Anton took his leave from his master and returned to his cell, intent on studying closures. He carefully read the entire "Lambda: The Ultimate..." series of papers and its cousins, and implemented a small Scheme interpreter with a closure-based object system. He learned much, and looked forward to informing his master of his progress.
On his next walk with Qc Na, Anton attempted to impress his master by saying "Master, I have diligently studied the matter, and now understand that objects are truly a poor man's closures." Qc Na responded by hitting Anton with his stick, saying "When will you learn? Closures are a poor man's object." At that moment, Anton became enlightened.
"""
> Strangely a lot of the functional programming advocates are fine with closures, which are guilty of all the same issues -- private state, hidden state, combining data with functions.
In functional programming closures (like other functions) only hold immutable data and cannot have side effects, so there is no private/hidden state involved. Code which can mutate state or produce side effects is procedural, not functional.
As bizarre as the stated API sounds, it's actually a good choice for a lock-free triple buffer where set() and get() are called on separate threads and shouldn't block each other: https://lib.rs/crates/triple_buffer
"hated all around the world" sounds a bit harsh :) Sure, lots of people like "throwing hate" at it, but AFAICT it's mostly "bad use" that gets people riled up like insane deep inheritance or overly complicated frameworks. Also, it seems especially young guns feel cool by claiming FP is superior ;)
AFAIK OOP languages are still ruling the whole GUI space, which is reasonable since GUI was the main driving force behind it (see history of Smalltalk) and the domain is such an obvious candidate for composition of separate independent elements. What languages are primarily used for GUIs today? Java, C#, Swift, ObjC, C++, Dart, Kotlin ... and the list can probably be made much longer.
Not sure if OO really rules the GUI space. Afaik, at least Swift, Dart (Flutter) and Kotlin are trying to solve the mismatch between OO and Reactive Programming (where functional approaches very helpful)
Most of GUI development is pure data handling (render state and react to interactions) where a strong functional toolset is much appreciated (lambda, pattern matching) and some parts are well done with closures (where OO comes in)
Ultimately I would love to have a GUI development language that allows me to use one set of language features and constraints when I really just want to use functions on data immutable data, strong pattern matching and ADT for modelling) and another when I need strong closures, with message based dispatches and reactivity.
Basically, whatever React does, minus the constraints of requiring JS compatibility.
I'd say OO still does rule the GUI space. The various reactive programming GUI tools are still struggling to reach the levels of complexity of UIs that were already common place in the 90s. Functional GUIs have their own problems with giant balls of state that makes composition difficult. So we break it down into smaller bits and it starts to look like objects again.
IMO the functional GUI push has less to do with functional GUIs being superior and more about dealing with the piece of shit that is the DOM. Native environments that don't have to deal with the DOM don't get the same benefit and have new problems that are solved by more OO approaches.
It all depends if you consider basically all non web GUIs developed the last 40 years or if you limit yourself to reactive web UIs developed the last few years. Tongue in cheek :)
Sure, reactive frameworks in js that mainly operate on the DOM/HTML/CSS stack may be very little OO, but Swift/Dart/Kotlin are OOP languages and Flutter for example, while using a reactive model, is still 100% OOP with Widget classes in a composition and so on.
Well non-web GUIs have been basically stagnant for a good chunk of that 40 years :)
You're right that it's OO under the hood. The latest thing I've used is CLJFX which is a React-like wrapper around JavaFX. I don't feel the OO side has much effect on my experience using the library. It's still events, callbacks, state-updates. The class hierarchies are irrelevant to the library user the vast majority of the time.
I wouldn't be surprised if for the library writers it provides benefits with code reuse and type gymnastics. But for mere mortals that need to refactor and reorganize our messy ideas OO hierarchies seem scary after React-like development.
Not sure if you are sarcastic or not. But if you look at how you develop windows app (vb, winforms, wpf, uwp and now maui) or Mac/iOS (from mvc, mvvm, and now mvu) and not forgetting Delphi. I find it far from stagnant.
With React you just switch your complexity. I don't feel more productive with my functional components than with my class component. I even more scared to introduce a memory leak with my useEffect than I was before.
But I do feel more productive with svelte or Blazor. That make me realize that OO vs FP is the the real vector. Reactive programming with good design is.
Like you said reactive programming and OO are not exclusive.
And if you look how you do React now with useState, useEffect and all. It's exactly a reproduction of OO, but inside a function that don't behave like a function anymore. And goes HOC for the inheritance/mixins/composition you flush down the drain.
In the end it is probably most important what you like to use rather than how it performs, which abstractions are best, etc.
If you can wake up every day and think "Today is a great day for some non-OO programming" and you get to it, adding value to you and hopefully others, who is someone else to look down on that?
After reading the comments, I get the impression we (and by proxy, many people?) don't agree on what OO means. There's a spectrum, including "Using classes / structs", "Not pure functional programming", "inheritance / getters/setters / factories", "everything is a class".
I think what OP means in the case of Joe Armstrong's comment is that Erlang follows the original conception of OO, as defined by Alan Kay, in which code is structured as black boxes passing messages and has nothing to do with semantics. It's true though, it's become such a muddy term.
The funny thing is that Erlang is more OO than any other so-called OO language. Messaging in Erlang is messaging not just another word for a function call with a funny syntax.
Smalltalk is a family of dialects and implementations. Most of them are indeed compiled to bytecode which is then executed by a JIT VM. Most of them use the "image" concept where you are always in runtime like in a classic Lisp, and yes, the VM handles shape changes etc etc. But some Smalltalks actually have other characteristics, like non JIT or even compiling via C (Smalltalk/X does that I believe).
I have no recollection of anything, I just wanted to share it to reddit and I realized it was already done long ago 4 times, one of the submissions by myself u_u
The general idea was to leverage Nim's capabilities, either as implementing core parts of standard libraries in Nim (which is very easy to do) or possibly by partial compilation using the Nim meta programming mechanisms.
A lot of things including very good development speed, very good debugging capabilities, very good meta programming (making your own tools) etc. Try out Pharo.org for example.
Looking at my inspirations I would (take it with a grain of salt) say that Lisp and Forth are too simple, javascript is a mess (but with nice literal syntax for maps etc), Smalltalk is too complicated and Rebol is basically also a bit complicated and IMHO a bit of an oddball with some neat ideas. And Nim is a totally different beast.
I have worked extensively with Smalltalk, I know it quite well and it's my favorite language. I made SqueakMap and several other packages for Squeak. Still, it's not as simple as it can/could be, especially not the meta model. Alan Kay himself has the same feelings AFAIK.
Do you have anything specific in mind about how you'd simplify it while keeping the overall experience? That's what I meant by the question.
Far as Kay, he's been building things on LISP's and Ometa-like languages in STEPS that I was aware. Given that, Im not sure how much he really believes im Smalltalk these days. Maybe he's implemented new Smalltalks that I just missed.
The multiuser stuff etc, I am temporarily too focused on other things so Spry is at "a hold" right now. I would also like to fix more things in the language before proceeding.
The Smalltalk keyword syntax is a simple preprocessing in the parser so that `a at: 3 put: 5` turns into the AST of `a at:put: 3 5`. And yes, it's homoiconic.
https://www.piumarta.com/software/cola/