Hacker News new | ask | show | jobs
by rightbyte 1244 days ago
You need to know how the compiler propagates types in detail to write performant code. It is quite hard.
1 comments

It's not 'quite hard' you just need to put types on your variable and function declarations.

If you leave them off you can make a function generic but you need to make sure you don't have multiple returns that could each return different types.