Hacker News new | ask | show | jobs
by tluyben2 1610 days ago
This is what I have noticed writing a lot of software communicating with systems (old systems) with not very well specified input & output; I first want to write drivel and make it work. I don't want to write/change 1000s of vars/fields while i'm not sure if I even need them etc. Then I want to throw away and refactor with lessons learned and I want to keep doing that, adding types (and sometimes proofs). Maybe with compiler flags which enforces static typing for the 'production version'.
1 comments

TypeScript is language that allows you to work like that. You may use as many and as few types as you need at any given stage of development.

As you start adding types to your working program compiler debugs your program for you finding various corner cases.

This motivates you to add more types.

Yea, it is indeed how I use typescript, but I do not really like javascript much. Typescript does make it better though. I wish other, nicer languages had this.