3 ms·
I wonder if Typescript would make a great first language, since a subset of it runs in the browser, but the IDE and compiler can prevent some very bad bugs.
by jonny_eh 5y ago
I wonder if Typescript would make a great first language, since a subset of it runs in the browser, but the IDE and compiler can prevent some very bad bugs.
- Hermitian909 5y agoIt might be a good extension after they'd spent a good amount of time in plain Javascript, 50-200 hours in depending on age IMO (younger -> more). Adding types is, again, confusing to most beginning students and adding any sort of build process is asking for tears. The bugs, while unpleasant, just aren't actually that bad pedagogically. Students readily accept explanations of the form "computers are dumb and do what you tell them, if you tell them to do something that doesn't make sense they will do something that doesn't make sense" which is close enough to correct to not give them a terrible mental that is difficult to unlearn later. Additionally, at this stage of learning students should be writing many small programs. Such programs are typically easy for teaching aids to debug in seconds (or to suggest a radically simplified re-write).