4 ms·
>Hell, I'd like it if a language could actually achieve linear types without holes or being completely unusable. I'm working on this: https://github.com/austra
by zetalyrae 5y ago
>Hell, I'd like it if a language could actually achieve linear types without holes or being completely unusable.
I'm working on this: https://github.com/austral/austral/ https://github.com/austral/austral/
The idea is to start with a simple, easily understood linear type system and then add borrowing, but without going too far in the direction where the type checker becomes a tower of heuristics and conveniences so that programmers can write normal-seeming code which magically typechecks.
So you can learn how to write linear code from reading a set of linearity rules, rather than from trial-and-error against the linearity checker.
- skohan 5y agoThis seems like a very cool project! Have you ever thought about putting a simple code example right in the README? Maybe it's too early days, but I know that's always the first thing I'm looking for when I stumble across a new language.
- zetalyrae 5y agoYeah I should get around to doing that, but right now there isn't much code that succinctly showcases the linear typing features. Probably have to implement some of the stdlib for that.
- throwaway17_17 5y agoA look at your anti-features list reminds me somewhat of Zig. Obviously the polymorphism is not in the Zig wheelhouse, but there are some similar seeming paths running through the readme. Your comment had me expecting a Haskel/ML presenting language, but now I’m wondering. Where do you see the syntax going?
- zetalyrae 5y agoThe syntax is Ada-like, e.g.: https://github.com/austral/austral/blob/469403c95219c4e6853729bf5b6311c02b083f42/examples/fib/Fibonacci.aum https://github.com/austral/austral/blob/469403c95219c4e68537...