Edward de Jong / Beads Project
04/19/2019, 7:59 AMwtaysom
04/19/2019, 8:23 AMKartik Agaram
Brian Hempel
04/20/2019, 3:08 PMmap
, filter
, fold
etc)—no looping constructs. (Recursion is allowed but discouraged—you have to mark callsites to recursive functions with rec
.)
2. Those collection primitives are packaged with pre- and post- conditions to ease verification. (The verification story is a bit hand-wavy though.)
3. Execution produces deterministic results, but there’s no guarantees on intermediate execution order. If a piece of code throws errors in parallel, which error is thrown may be non-deterministic, but that some error is thrown is deterministic.
4. Function arguments are (apparently) matched by name and by type first, and then by position. This is an idea I’ve wanted to explore because it’s superficially more ergonomic but there may be some tricky downsides (e.g. with complicated arg matching rules, how do you determine if an API change breaks existing code?).
5. There’s special syntax for denoting optional values that can be none
, and syntax for allowing method calls on none
to return none
instead of crashing.
The following ideas are extolled in the paper but I don’t think they are quite so novel or worthy:
1. Local multiple assignments to the same variable are not actually mutations of the same memory location. I’ve thought about this before: the naive version doesn’t work work all the time because where you want multiple assignment is in folds and the above semantics doesn’t work there.
2. All objects support record update syntax and record merge syntax. What’s novel here is applying this to a more traditional OO model; but its core is just plain old functional record update syntax. There’s also a field projection syntax, which is handy.
3. Well defined interface to the outside world. It’s a good idea to have an API to the OS, but the writeup makes it sound like this solves all the messy IO system call stuff when really it just pushes that mess out of scope of the language. You’ll still have to deal with it sometime.
Ideas perhaps worth discarding:
1. No referential equality (that’s fine) but to support custom equality measures you simply define a field named key
on your objects/records. You only get one of these: now you’re toast if you want a different equality metric or your equality metric wasn’t precise enough.
2. No logging. (Stated justification: when your language is deterministic you don’t need logging.)David Piepgrass
04/30/2019, 3:50 PM