I really need to add pattern matching to Crochet but also... pattern matching is a terrible idea in an Ocap language :/
Conversation
Why is it a terrible idea? Do they interact in strange ways?
1
1
Pattern matching in most FP languages relies on ubiquitous reflection; Ocap requires strict control over reflection (and, indeed, almost extinguishing it entirely).
Views, Extractors, and first-class patterns address some of this, but none written for specific security models.
1
2
Part of my work in the past was about this for tagged records, which was also confusingly called Views (github.com/origamitower/p), but quite distinct from Wadler's idea of Views.
This pretty much adds field-level capabilities, but you end up needing more than that ime
1
1
Replying to
Very interesting to read, thanks!
As an aside the separate `symbol` command is neat – have considered having something like that as a way of getting around the ‘stringy’ nature of record fields, so cool to see it pop up somewhere else!

