News for hackers. Stuff that matters.
Re:Design Principles Behind Smalltalk (1981) by Konohamaru on Saturday June 13, 2020 @11:30AM (#23510115)
OO was the best programming paradigm until people recognized the power of concurrency. Even in the usecase of GUI programming, where OO is supposed to shine the brightest, OO is a failure because interactive programs are extremely concurrent. Even back then when everything was executed in serial GUI frameworks were designed concurrently in crummy languages never designed to support concurrent programming such as C. Or worse, C++.

And functional programming is no good as a general programming paradigm because:

1. Little of computing--almost nothing--is declarative. That means functional programming's non-general by definition.

2. Programming cannot be married to mathematics despite what formal proof proponents and people who think naming their language "Pascal" is a good idea think. It will always be an arranged and sham marriage.

3. Thinking being able to easily execute your declarative programs in parallel means you'll never have to think concurrently and can just outsource everything to Hadoop only means you can't understand the difference between parallelism and concurrency.

Re:Design Principles Behind Smalltalk (1981) by throwaway_pdp09 on Saturday June 13, 2020 @01:12PM (#23510922)
> OO was the best programming paradigm

No, it depends on what you're doing. Always does, always will.

> Even in ... GUI programming, ... OO is a failure because interactive programs are extremely concurrent

Seems to work well for me on windows. What's the problem precisely?

> And functional programming is no good as a general programming paradigm because ... Little of computing--almost nothing--is declarative

That's just wrong.

> Programming cannot be married to mathematics...

You give no evidence despite it being a long association.

> Thinking being able to easily execute your declarative programs in parallel means you'll never have to think concurrently

Yes, because concurrency only becomes an obvious issue when state is involved. So FP sidesteps that by not having interacting state. I have some criticisms of FP but this is plain silly.

You're just dissing stuff here. It's annoying.

Re:Design Principles Behind Smalltalk (1981) by Konohamaru on Saturday June 13, 2020 @04:50PM (#23512596)
> Little of computing--almost nothing--is declarative... That's just wrong.

* Artificial general intelligence * Operating systems * Video games * Emulators for hardware * Interpreters * Debuggers * Word editors * Image editors * Graphical user interfaces * Robotics * Web browsers * Servers

Basically everything that makes computing interesting is non-declarative and concurrent. Financial math on K street, parser combinators, and SQL queries are the declarative segment of programming.

Re:Design Principles Behind Smalltalk (1981) by throwaway_pdp09 on Saturday June 13, 2020 @05:19PM (#23512822)
OK, good comeback. It's forcing me to be precise.

Declarative/imperative are models, not necessarily implementations (although they often are treated as model x = implementation x). You need to separate the two conceptually, but in implementation you can do both. Anything you can do declaratively you can do imperatively and the reverse.

As such it makes it meaningless to say that almost nothing is declarative because how you choose to create it is a choice. How well it runs is another matter because real hardware is relentlessly state-y, but that's an implementation issue. And that's fine, and sometimes imperative stuff is just cleaner.

But you can write a web browser or a GUI or whatever declaratively, but underneath it will be imperative because that's hardware.

Declarative vs imperative is a choice, not necessarily a 'natural' thing, (depending on the problem, I'd say a web page renderer is distinctly stateless - take some static HTNL, render it, where's the state?). A web server can be stateless too, a request comes in, a web page goes out. I need someone else to speak for others, pretty sure stateless GUIs have been written.

Any big data cruncher that works on petabytes, purely with output coming from input deterministically is effectively stateless.

Re:Design Principles Behind Smalltalk (1981) by jolux on Saturday June 13, 2020 @06:02PM (#23513169)
Nothing is declarative or imperative outside of a certain implementation of a solution. All of the things named trivially have declarative solutions because of Turing completeness. Whether or not a paradigm lends itself easily to something is a bit of a different question, but I think a lot of people tend to say “oh, that’s obviously stateful and imperative” merely because they haven’t thought about the problem in a different way.
Re:Design Principles Behind Smalltalk (1981) by Konohamaru on Saturday June 13, 2020 @06:12PM (#23513255)
Turing machines only model mathematical functions. They cannot model anything on my list. That's why computer scientists invented I/O automata in an attempt to build a theoretical model that handles some of those items on my list.

> “oh, that’s obviously stateful and imperative” merely because they haven’t thought about the problem in a different way.

No I am not a conventionalist.

Re:Design Principles Behind Smalltalk (1981) by throwaway_pdp09 on Saturday June 13, 2020 @06:58PM (#23513565)
> Turing machines only model mathematical functions. They cannot model anything on my list.

Since turing machines are turing complete, and existing general purpose CPUs are turing complete, this is trivially incorrect.

> That's why computer scientists invented I/O automata ... those items on my list

wat?

Re:Design Principles Behind Smalltalk (1981) by Konohamaru on Saturday June 13, 2020 @09:27PM (#23514378)
How can a Turing machine simulate concurrency?
Re:Design Principles Behind Smalltalk (1981) by throwaway_pdp09 on Sunday June 14, 2020 @04:51AM (#23516092)
It doesn't need to because it's implementation details.

Where it's needed such as in modelling the very important implementation detail of parallelism on multi-core machines to ensure correctness (such as with model checkers like Spin) then stuff like buchi automata are used, but that's dragging maths into the real world to solve real world problems. Turing machines don't live in the real world.

Please just stop.

Re:Design Principles Behind Smalltalk (1981) by Konohamaru on Monday June 15, 2020 @02:30PM (#23531134)
We know a Turing machine can't model all aspects of concurrency because a Turing machine with threads can compute an integer of unbounded size while there's always a bound on the greatest integer an unthreaded Turing machine can.

But this is all naval-gazing anyway. What's even the point of a purely-declarative OS when it's either gonna:

1. Act as a glorified C preprocessor for an imperative language like Haskell and its do-notation?

2. Look like brainfuck?

Re:Design Principles Behind Smalltalk (1981) by jolux on Sunday June 21, 2020 @05:09PM (#23595421)
Haskell with do-notation is not imperative, that’s a common misconception. It’s a special syntax for working within a monad that desugars to nested function calls.

Typically declarative systems are interesting because it is easier to prove strong properties about them.

Re:Design Principles Behind Smalltalk (1981) by Konohamaru on Sunday June 28, 2020 @09:39PM (#23673577)
I agree. Declarative systems are interesting. I am not against studying, implementing, or understanding declarative OSes from an intellectual viewpoint. Rather, people generally speaking ignore that the declarative perspective is not teleological and doesn't reflect the teleology of an underlying OS.

Imperative programs are so popular among "joe schmoe" average programmers because they have a clear teleology. People are willing to forgive that imperative programs are harder to formally reason about because they make the teleology clearer. But have you seen declarative code? Because it's like math formulas, each function needs the same kind of documentation in order to understand the teleology behind the function.

Re:Design Principles Behind Smalltalk (1981) by jolux on Saturday June 13, 2020 @07:20PM (#23513702)
This is like...not even wrong.
Re:Design Principles Behind Smalltalk (1981) by pjmlp on Sunday June 14, 2020 @03:20AM (#23515746)
Interesting given that many of the original problems that were tackled with OOP were precisely concurrency and distributed computing.

Even the Xerox manuals contain several examples.

Re:Design Principles Behind Smalltalk (1981) by discreteevent on Saturday June 13, 2020 @01:40PM (#23511123)
OO has had most success in GUI programming. As for concurrency, Erlang seems to do ok and its creator called it "possibly the only object-oriented language"
Re:Design Principles Behind Smalltalk (1981) by jcelerier on Saturday June 13, 2020 @12:38PM (#23510658)
> Even in the usecase of GUI programming, where OO is supposed to shine the brightest, OO is a failure because interactive programs are extremely concurrent. Even back then when everything was executed in serial GUI frameworks were designed concurrently in crummy languages never designed to support concurrent programming such as C. Or worse, C++.

I must say that I have trouble reconciling this with the fact that every single GUI program running on my computer right now is written mostly in C++ with a bit in C for my WM and a bit of Rust for Firefox.

Re:Design Principles Behind Smalltalk (1981) by jbverschoor on Saturday June 13, 2020 @12:38PM (#23510661)
Messagepassing and poking around in objects is awesome.

But more from a user developer point of view. Power user.. power users aren’t here anymore