<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace">I'm irresistibly reminded of this exchange from</div><div class="gmail_default" style="font-family:monospace,monospace">the Goon Show episode "The Great Bank of England Robbery":</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">SEAGOON: How do you play the inside of a cylindrical record backwards?<br><br>BLOONOK: Quite simple, you put it on in the opposite direction, going away from you, the other way.</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">Dart/Isolates/Flutter looks WONDERFUL if I put my Javascript spectacles on,</div><div class="gmail_default" style="font-family:monospace,monospace">but with my Erlang glasses it's a dreadful tangle of "callbacks" and objects.</div><div class="gmail_default" style="font-family:monospace,monospace">Isolates, good. The key thing about an isolate is its event loop,</div><div class="gmail_default" style="font-family:monospace,monospace">AND IT'S NOT YOUR EVENT LOOP. You can't even see it. It's DART's event</div><div class="gmail_default" style="font-family:monospace,monospace">loop, doing whatever Dart wants to do. You cannot tailor it. You cannot</div><div class="gmail_default" style="font-family:monospace,monospace">have a process which has different selective receives in different states.</div><div class="gmail_default" style="font-family:monospace,monospace">Communication between isolates is in terms of actions, not messages.</div><div class="gmail_default" style="font-family:monospace,monospace">It's as if someone heard of the actor model (which is actually where</div><div class="gmail_default" style="font-family:monospace,monospace">Smalltalk started, irony of ironies), and passed the idea on to</div><div class="gmail_default" style="font-family:monospace,monospace">Sven the User Interface Designer <a href="https://dilbert.com/strip/1994-12-27">https://dilbert.com/strip/1994-12-27</a> .<br></div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">OK, so I'm exaggerating for humourous effect, but when the sales pitch for</div><div class="gmail_default" style="font-family:monospace,monospace">a programming language puts up such horrible examples of what *ought* to</div><div class="gmail_default" style="font-family:monospace,monospace">be very simple and the presenter says how simple it is, somebody isn't getting</div><div class="gmail_default" style="font-family:monospace,monospace">*something*.</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">I think it was the video on async/await that I understood what was</div><div class="gmail_default" style="font-family:monospace,monospace">bothering me. All this subtle and elaborate syntax, because</div><div class="gmail_default" style="font-family:monospace,monospace">THE BASIC IDEA IS THAT CONCURRENCY IS ABNORMAL.</div><div class="gmail_default" style="font-family:monospace,monospace">That fundamental view is built into the language: NORMAL programming is</div><div class="gmail_default" style="font-family:monospace,monospace">sequential object-oriented programming, concurrent processes are the ABNORMAL</div><div class="gmail_default" style="font-family:monospace,monospace">exception that needs "heavyweight" interfaces to cope with the mind-twisting</div><div class="gmail_default" style="font-family:monospace,monospace">horror. (The many-angled ones live at the bottom of the Mandelbrot set,</div><div class="gmail_default" style="font-family:monospace,monospace">as it were.)</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">The basic idea of Erlang is that CONCURRENCY IS NORMAL.</div><div class="gmail_default" style="font-family:monospace,monospace">It's not quite as extreme as Flat Concurrent Prolog or Guarded Horn Clauses</div><div class="gmail_default" style="font-family:monospace,monospace">where the idea was the concurrent programming was the ONLY kind.</div><div class="gmail_default" style="font-family:monospace,monospace">This was Joe Armstrong's genius, and I'm so sad that he's not here to read</div><div class="gmail_default" style="font-family:monospace,monospace">that comment. Don't add concurrency to an existing programming language.</div><div class="gmail_default" style="font-family:monospace,monospace">Start with concurrency and add a language to that.</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">So it is a good thing that Dart programmers have something better to</div><div class="gmail_default" style="font-family:monospace,monospace">work with than C++ programmers. It could have been even better, but</div><div class="gmail_default" style="font-family:monospace,monospace">it can't get *much* better without ceasing to be Dart.</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 9 Jan 2022 at 11:25, Garry Hodgson <<a href="mailto:garry@snarkus.com">garry@snarkus.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div>
<p>I’ve been looking into Flutter a bit as a platform for phone
apps, and that got me looking into the Dart language. Their
approach to concurrency feels awful familiar, with “isolates”
looking a lot like Erlang processes. It’s actually pretty cool,
nice and clean, albeit wrapped in some OO noise. I imagine,
though don’t know, that they were influenced by Erlang/Elixir,
although I suppose something like parallel evolution of the
Actor model could be responsible as well (sharks and whales look
a lot alike).</p>
<p>Anyway, I wondered what other Erlangers thought about it. You
can find an overview here: <br>
</p>
<p><a href="https://www.youtube.com/watch?v=vl_AaCgudcY" target="_blank">https://www.youtube.com/watch?v=vl_AaCgudcY</a></p>
<p><br>
</p>
</div>
</div>
</blockquote></div>