Stop giving code examples in TypeScript
steverydz.com
Stop giving code examples in TypeScript
1–10 of 14 posts
Re: Stop giving code examples in TypeScript
#2Re: Stop giving code examples in TypeScript
#3Re: Stop giving code examples in TypeScript
#4Re: Stop giving code examples in TypeScript
#5This pathological drive in the JS dev community to pretend the language they're working with doesn't exist is counterproductive - what happens when no one in the javascript development community actually knows javascript, and the standard tool for generating javascript moves on to something other than typescript?
Re: Stop giving code examples in TypeScript
#6The ecosystem is largely adopting Typescript as the canonical way to write javascript applications now, and having types makes the code more readable. I feel like it makes a lot more sense for tutorials to show things in Typescript, which is what most devs would actually use, rather than lose that type context with pure JS.
Re: Stop giving code examples in TypeScript
#7I'm going to drop a spicy hot take here... no one should be using typescript unless they actually understand javascript first. And I agree with the author. There's no good reason why JS code examples should all be in typescript, and more than when they were all written in JQuery. It speaks to a fundamental lack of knowledge within the JS community of anything beyond the surface level. This pathological drive in the J…
Re: Stop giving code examples in TypeScript
#8I don't understand this argument. TypeScript is just JS + type annotations — you should be able to boil away any fluff and be left with functioning JS. Whereas jQuery has actual runtime logic that would need to be reworked if you wanted a $-free solution.
The author goes on to say:
> This was even worse when the question was along the lines of “How do you do (jQuery thing) in JavaScript?”.
When would anyone ask "How do you do (TypeScript thing) in JavaScript"?
Re: Stop giving code examples in TypeScript
#9Does TS have a steep learning curve, or just a steep config curve? I personally feel that once a project has TS up & running, the actual use of it can be straightforward. Inference is so good these days, you shouldn't see many actual types at all in your code.
Have I just been using it too long, and I've forgotten the initial pain?
Re: Stop giving code examples in TypeScript
#10> TypeScript has a steep learning curve Does TS have a steep learning curve, or just a steep config curve? I personally feel that once a project has TS up & running, the actual use of it can be straightforward. Inference is so good these days, you shouldn't see many actual types at all in your code. Have I just been using it too long, and I've forgotten the initial pain?