News for hackers. Stuff that matters.
Re:The Svelte Compiler Handbook by orange8 on Wednesday April 08, 2020 @07:09AM (#22811824)
TS may compile down to JS, but that does not make it the same language. TS done the proper idiomatic TS way is just very different from JS done the proper functional + dynamic way. How you structure your code using a dynamic, functional language should be very different from how you structure your code in a static, object oriented language. If your code structure looks more or less just the same between the two, then you are doing one of them wrong.

> you have to remember that its type system is optional

Doesn't opting out of the type system defeat the purpose of using TYPE-script in the first place?

Re:The Svelte Compiler Handbook by CapsAdmin on Thursday April 09, 2020 @08:14AM (#22821794)
> TS done the proper idiomatic TS way is just very different from JS done the proper functional + dynamic way.

Where do you get the idea that Typescript code should be structured like a static object oriented language? Is it because it's a Microsoft product?

Letting Typescript try and figure out the types while coding in a "dynamic and functional way" is what works best for me. Is this wrong?

Re:The Svelte Compiler Handbook by orange8 on Friday April 10, 2020 @09:42AM (#22832890)