Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It would be nice to have a language with a scalable type system. Allow dynamic typing for quick prototyping and exploratory programming, then layer on static typing as needed for performance and reliability. For example start by declaring a variable, which could be anything. Then constrain it to be a number. Then a floating point number. Then a floating point number in the range [0.0, 1.0). And please optimize for performance instead of precision. Etc.


TypScript is sort of this. It's the best of both worlds, if it wasn't built on top of JS legacy garbage type system and core types it would be ideal.

But a powerful structural type system built on a flexible object model is really a great mix - type as much as you need, ignore types when they get in the way.


Sounds like Racket with Typed Racket.




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

Search: