News for hackers. Stuff that matters.
Re:Nectar: A Native JavaScript Compiler Inspired by Crystal ... by mafribe on Friday December 30, 2016 @05:43PM (#13288148)
You can generate code for all type combinations for a and b. This will blow-up compiled code. It's a classic space-time trade-off.

Moreover, you can carry out heavy static analysis that can often narrow down the possible types for a and b. The main problem with this is that static analysis that is good enough will run very slow, hence it not an option for the web-browser.

Re:Nectar: A Native JavaScript Compiler Inspired by Crystal ... by geocar on Saturday December 31, 2016 @03:33AM (#13290159)
You only need to generate code if it's being used, which means you can trade RAM (for a larger compilation unit) to reduce the number of (different types of) inputs.