Andrew Reece
12/21/2018, 10:16 AMgoto
. It then presents the analogous solution. (N.B. others have named the same concept different things - bundle
, scope
, nursery
, maybe others...). Notably this approach would seem to map to visual representation far more easily than promises/arbitrary thread spawning/...
https://vorpus.org/blog/notes-on-structured-concurrency-or-go-statement-considered-harmful
For related links, including to videos on the topic, see http://250bpm.com/blog:137
Aside: the term 'structured' seems too generic for what people actually mean. AFAICT, in the context here/of `goto`s, 'structured' always means 'hierarchically structured', despite other types of structure existing.stevekrouse
a=6+7
b=1+4
Clearly the computer should automatically do these statements in parallel because they have nothing to do with each other. But in imperitive languages it defaults to one after another unless you manually specify concurrencyAndrew Reece
12/21/2018, 11:17 AMAndrew Reece
12/21/2018, 11:24 AMAndrew Reece
12/21/2018, 11:36 AMAndrew Reece
12/21/2018, 3:30 PMAndrew Reece
12/21/2018, 3:31 PMmut
for mutable datastevekrouse
Andrew Reece
12/21/2018, 3:53 PMwtaysom
12/21/2018, 4:14 PMKartik Agaram
Brian Hempel
12/21/2018, 5:02 PM1) are there any languages that do/approach this?Pretty much any ML-style functional language spiritually descended from the lambda calculus—which itself is only expressions. That is, Standard ML, OCaml (and its ReasonML reskinning), Haskell, Elm, etc.
2) what are the implications of this? (any resources you can point me towards?)Expression oriented functional programming discourages (or completely disallows) using mutation, which anecdotally seems to reduce bugs because at any place in your code mutation/statefulness means that the things you are working with now may not be what they said there were when you started working with them, which is an opportunity for bugs. In expression-oriented functional programming, what you gain in confidence comes at the cost that you have to write lots of recursive code. While lots of common code is just as easy or easier to write, a few particular patterns become a lot harder, namely traversing a large data structure and gathering some order-dependent information about it (which is why I gave up and hacked mutation into Elm for our project 😄 but then it’s also caused me lots of headaches, within the last week I spent half a day tracking down a bug that turned out to be because I accidentally mutated an input to a function). I realize the question was about expressions (code pieces that have a return value) vs. statements (code pieces that do not), but the fundamental difference is mutation. Pure expressions communicate their computational result by traditional return—the expression itself evaluates to the result. Statements do not return anything, so they must communicate their result by mutation of some local or global state. So it is about mutation at the end of the day.
Kartik Agaram
Kartik Agaram
Brian Hempel
12/21/2018, 5:21 PMKartik Agaram
Kartik Agaram
Enable all people to modify the software they use in the course of using it. (https://futureofcoding.org/episodes/033)I think the place where we diverge is the
in the course of using it
part. Or at least that seems like a much lower priority to me. If you try to attack both halves at once (allow modification
and in the course of using it
) you're liable to add features at the product/UI level to help with the latter that make certain kinds of modification harder. But then I (still) don't really understand Smalltalk yet..jonathoda
12/21/2018, 8:49 PMjonathoda
12/21/2018, 9:09 PMshalabh
12/21/2018, 9:28 PMHave people here given much consideration to structured concurrency?Yes - I'm also familiar with Nathaniel's Trio you linked to. I think that's an (incremental) step in the right direction, if we were to stick with coroutines. Another interesting language in this space is http://www.ceu-lang.org/. I think concurrency shouldn't be a library or afterthought but has to be part of the system design from the very beginning. After all, all state is 'concurrent' if you consider all values present in any program or system all exist at the same time in different places.
Kartik Agaram
Brian Hempel
12/21/2018, 10:30 PMBosmon
12/21/2018, 10:52 PMshalabh
12/21/2018, 11:23 PMjonathoda
12/22/2018, 1:24 AMIvan Reese
in an environment where the instruction pointer is materialisedCan you link me to some of those, or drop names? This is an area of active research for me, and I'm very eager to see any and all examples of materalized / visible / tangible / explicit instruction pointers.
Andrew Reece
12/22/2018, 10:45 PMwtaysom
12/23/2018, 6:42 AMf(g(), h())
in C, the order in which g
and h
get called is undefined!
It all boils down to expressing intentions. Is there a bug which isn't a mismatch between what we wrote and what we meant? Can tools help identify the subtle interactions (causally or otherwise) without getting in the way? I suppose being able to clearly express the differences is an essential prerequisite.
So much client work amounts to pinning down the basic design of things... Is there one of these or many of them? Do it go with one of those or many of them? When do they get put together? Who needs to sign off on it?stevekrouse
Bosmon
12/23/2018, 11:50 AMBosmon
12/23/2018, 12:04 PMjonathoda
12/23/2018, 7:00 PMBosmon
12/23/2018, 11:31 PMjonathoda
12/24/2018, 12:45 AMBrian Hempel
01/07/2019, 2:15 PMI’m afraid I lack the naïveté to do that again.If you could do it again, would you do anything differently?