4 ms·
Not only is TypeScript's typing system less verbose, but it's smarter than old school (Java-esque) type systems. I just released a new version of Autumn[1] this
by sephoric 8y ago
Not only is TypeScript's typing system less verbose, but it's smarter than old school (Java-esque) type systems. I just released a new version of Autumn[1] this morning that uses TypeScript's union types and type literals, and has this built-in: `type ModString = "command" | "control" | "option" | "shift"` so that now, even though you're still passing strings to Hotkey.activate, the IDE will actually warn you if you pass a typo like "comman". Not only that, but if you press Control-Space (same as in VS Code), it will actually auto-complete valid options for you. TypeScript is full of little goodies like this that are IDE-friendly, which is why I chose it for Autumn instead of plain JavaScript or Lua.
[1] the best macOS window manager: https://sephware.com/autumn/ https://sephware.com/autumn/
- GordonS 8y agoI'm primarily a C# guy, so I'm no stranger to static typing - TypeScript's type system is a real joy to work with. Between C#, F# and TypeScript, the three seem to be borrowing more and more from each other as time goes by (e.g. default interfaces and nullable reference types are coming in C# 8). It almost feels like they'll all converge at some point!
- ivankolev 8y agoC# and Typescript are both co-developed by Anders Hejlsberg, so no wonder.
- Belphemur 8y agoWhy it make it a string enum then? You can do that in any typed language too.