3 ms·
I've been working on it for a little over a year. The biggest challenge so far has been designing and implementing a type system with the flexibility required f
by continuational 7y ago
I've been working on it for a little over a year. The biggest challenge so far has been designing and implementing a type system with the flexibility required for ad-hoc scripting. Building a standard library that can tackle dirty real world problems as nicely as possible is an ongoing challenge too.
In TopShell, Streams are analogous to pipes. The primary way you use TopShell Streams is by combining and transforming them into new streams. The interface for streams is very similar to what you might find in a Functional Reactive Programming library, and indeed it can be used to eg. animate SVG based on data that's streamed from somewhere.
- iamwil 7y agoWhy would ad-hoc scripting require more flexibility with a type system? What kind of flexibility? Is it that you need more types? Or more union types to handle all the different variations that are the same, but all slightly different?
- continuational 7y agoAnonymous records and variants are convenient in a scripting language because you don't have to declare them. This in turn leads to anonymous record types and anonymous sum types, which require something beyond HM for type inference, and I wanted to avoid introducing row variables. TopShell uses type constraints for this, and I've never implemented a type constraint solver before TopShell. There are also some extra things to do around checking explicit type annotations, when the user provides them.