Hacker News new | past | comments | ask | show | jobs | submit login

I disagree - allowing for type inference on the closures will make for a much more pleasant language, whereas requiring type annotations on top level functions makes sense for lots of reasons.



> allowing for type inference on the closures

You can still have your type inference without forcing the unnecessary requirement that local functions be `fn` while top functions be `func`.


I agree with this, I'm designing a similar language and have gone with this approach. Same syntax for all functions, but top-level functions require explicit type annotations (purely for documentation/sanity more so than a technical requirement).


agreed, but there's still differentiation in syntax, and I was responding to someone asking for no differentiation.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: