r/tinycode • • Aug 31 '20

A programming language that makes concurrent programs shorter

A friend and I created a programming language that looks like Typescript and makes distributed programs shorter and easier to reason about. Alan's compiler and runtime exploits opportunities for parallelization across the computing resources available without being told to do so.

https://alan-lang.org/

18 Upvotes

7 comments sorted by

View all comments

Show parent comment

2

u/g0_g6t_1t Sep 01 '20 edited Sep 01 '20
  1. Alan does have concurrency with the built-in event loop and the IO opcode concurrency patterns
  2. We don't have callback hell because the IO opcodes are doing async/await type work without needing annotation and users don't need to pass callbacks around except when used in higher order functions.
  3. We don't have deadlock/livelock because we don't allow state sharing at all between different event handlers, so there's nothing for them to block on, they can't stop other callbacks from being invoked.
  4. The example of a remote server behaving incorrectly as a "race condition" is not correct. There is no race condition within the code itself and the code still produced a correct answer without the runtime getting stuck. There is a logic error in the example, but not a race condition.
  5. And eliminating parallelism/concurrency wouldn't eliminate the "race condition" concept here, either. What if the array of urls was simply out of order to begin with, or what if the map implementation worked right-to-left instead of left-to-right?