←back to thread

1401 points alankay | 1 comments | | HN request time: 0s | source

This request originated via recent discussions on HN, and the forming of HARC! at YC Research. I'll be around for most of the day today (though the early evening).
Show context
Adam-Kadmon ◴[] No.11940379[source]
What is the best language to learn OOP concepts ?
replies(1): >>11946410 #
alankay1 ◴[] No.11946410[source]
Good question. If we are talking "real OOP", I'm not sure these days. What do other people think?

Smalltalk is very long in the tooth these days, but it is still "rather object-oriented in good ways".

Erlang and its derivatives are fun and good to help that kind of thinking.

replies(2): >>11947670 #>>11949486 #
npm83 ◴[] No.11947670[source]
What do you think is missing from Smalltalk, and what would you expect for the "21th century Smalltalk" if there was such think?

Even though is "old", I find it extremely valuable for learning to think and reason in a pure OO fashion.

replies(1): >>11948686 #
alankay1 ◴[] No.11948686[source]
It's worth thinking about what scales and what doesn't scale so well. For example, names are relatively local conventions. We could expect to have to find better ways to describe resources, or perhaps "send processes rather than messages". Think about what's really interesting about the way Parc used what became Postscript instead of trying to define a file format for "documents" for printers ... (a programming language can have far few conventions and be more powerful, so ...)
replies(3): >>11949633 #>>11949758 #>>11951418 #
blihp ◴[] No.11949758[source]
Granted, names have their problems. But as a tactical solution URLs can be used to send high-level messages or at least as a name resolution scheme to initiate communication between two or more OO systems. And URLs are just names... (credit where it is due: I first heard the thought expressed by you and it gets the job done until something better comes along)

Admittedly this does not (directly) address the issue of sending processes (which could be handled indirectly as payload.) Or am I missing the bigger picture you're driving at here?

replies(1): >>11949815 #
alankay1 ◴[] No.11949815[source]
Keep on turning the crank ...

What if you need something but don't know its name or URL? Etc.

replies(1): >>11950535 #
blihp ◴[] No.11950535[source]
My example definitely presumed things like service discovery which gets you to URLs. But I think I see the larger point you make about what if you don't even know what kind services are available (which my example assumes you already know) and once told of their existence how do you negotiate their capabilities and usage (my example, as I envisioned it, completely falls apart here without some major plumbing which might require running an open sewage line through the kitchen. i.e. probably not the best way to do it)

P.S. I have found the team's work on STEPS quite thought provoking. If anyone could find the time once things settle down, it would be most appreciated if some quick docs re: how to reproduce (i.e. build) the Frank environment could be put together. (if they already exist, a pointer to them would be helpful)

replies(1): >>11951439 #
mmiller ◴[] No.11951439[source]
One thing I've found about the web, as it exists, is that the people who set up a system for the outside world to use change it over time. The URLs change. The CGI their service will accept changes. As things exist now, a program must use "sticky" names, and if a name changes, all of a sudden the connection is broken, even though the exact same functionality still exists. It would be good if a program could find the functionality it needs based on a functional description of what it needs, rather than a name. That gets more to what's really important. I once complained to Alan that Smalltalk had the same problem. If I change the name of a class, all of a sudden all the code in the system that needs that class could no longer find it, even though I had changed none of its functional code. This seemed like an extremely brittle scheme for finding resources. The name is not the important thing about what a program needs. It's just a reference point that does nothing. Names are still good, because they allow us to quickly identify resources, but they should mainly be for us, not the program, because when you really think about it, a program doesn't care what something is called.
replies(1): >>11953017 #
alankay1 ◴[] No.11953017[source]
Hi Mark

Actually, this is not quite true about Smalltalk code (which is linked to its class). But referring to things is also done via variables and selectors of various kinds, and these are names which have to be locally known. Smalltalk can also find quite a few things by description (for example it can find things like the "sine function" via examples of inputs and outputs).

replies(3): >>11959172 #>>11960714 #>>11962661 #
1. chriswarbo ◴[] No.11960714{8}[source]
> it can find things like the "sine function" via examples of inputs and outputs

I think this is a really important idea. On one hand, it can save us from re-inventing code which already exists (e.g. "this existing code will satisfy your test suite"), it can help us discover relationships between existing things ("the function 'sine' behaves like the function 'compose(cosine, subtract(90))'"), it can aid refactoring/optimisation/etc.

On the other hand, it could also help us discover services/information which we could not obtain by ourselves. For example, discovering a database mapping postcodes to latitude/longitude.

There's some interesting work applying this to pure functions, using testing https://hackage.haskell.org/package/quickspec and proofs https://github.com/danr/hipspec

It's also closely related to inductive programming (e.g. inductive logic programming, inductive functional programming, or even superoptimisation), where combinations of existing functions are checked against the specification. Of course, that leads down the path to genetic programming, and on to AI and machine learning in general!