3 ms·
Structure means walls. There are tons of crazy things you can do 'outside' the walls with javascript. There are no checks if anything you reference exists or th
by pixie_ 10y ago
Structure means walls. There are tons of crazy things you can do 'outside' the walls with javascript. There are no checks if anything you reference exists or that your assignments are compatible. The browser's compiler will figure it all out and/or blow up at run-time.
Type and reference checking creates the walls your code must stay inside of otherwise there are compile errors. The compiler enforces a certain structure on your code that you must adhere to in order for the compilation to succeed.
Think of it like a coloring book where TypeScript keeps you inside the lines. Ever see a three year old's coloring book? :p
- caseymarquis 10y agoAs much as I love programming with no self imposed 'walls', I fear maintaining anything larger than 10,000 lines created that way. When you step into an existing enormous code base with no testing implemented, static typing and the associated tooling are fantastic.