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

Strong typing is a start but not enough for my taste. Static typing serves as documentation and compile time bug check, which is awesome to have. I'd like to have both, without the detour over typescript.



I don't think you're going to get strong types in standard JavaScript any time soon. Isn't TypeScript a very good compromise right now?


My take is that having dynamic typing plus strong typing is a (pretty) good compromise. And static typing plus weak typing, insufficient.


What languages would you put in these two categories?


Not all languages but here's a list:

dynamic typing, strong typing: python (for the most part), Scheme

dynamic typing, weak typing: Javascript, PHP

static typing, strong typing: Pascal, Ada, Java, C#

static typing, weak typing: C, Typescript, perhaps others

SPECIAL CASES:

strongly typed, dynamically typed, but with some compilers it can also be statically typed: Common Lisp

strongly typed, statically typed but can infer types: Haskell, ML family

strongly typed, can infer type with "auto" keyword: C++ (latest version)

non-typed: Machine language, assembler, perhaps Forth


What better alternative do you have to TypeScript right now though that you can use practically with existing libraries? Perfect is the enemy of good. TypeScript can capture more complex properties than C as well.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: