diff --git a/fine/design.md b/fine/design.md index 506a3d0d..df9cc5d8 100644 --- a/fine/design.md +++ b/fine/design.md @@ -39,3 +39,28 @@ The `new` keyword is a compromise: we know that the context immediately following the `new` keyword is always a type expression, so we know that e.g. `<` or whatever means "generic type parameter" and not "less than". + +## Lambdas/Closures/Anonymous Functions + +Looking for a syntax here; I want to keep `fun` as a declaration like +`let` and not let it enter the expression space. I don't like +fat-arrow syntax because it makes expression parsing very ambiguous, +potentially requiring a lot of lookahead. (TODO: Is that true?) + +Maybe a leading character like ` \x => x+1 ` or ` \(x,y) => x+y `? + +## Interfaces/Traits/Whatever + +These are incomplete structural types. Methods are easier to make +compatible than members, but members should also work so long as they +are strict prefixes of the thing. + +What about sound casting with narrowing? That's union types baby, do +we really want those? It could be neat if we're doing otherwise +structural-compatibility. + +## On Objects and Classes + +Sometimes I think it should all be structural types. + +Maybe later there can be anonymous types that match shapes.