4 ms·
Why not simply use Javascript? Today it's a fine language. You may complain about fatigue etc which I can buy, but Rescript is simply not solving that.
by ecmascript 6y ago
Why not simply use Javascript? Today it's a fine language. You may complain about fatigue etc which I can buy, but Rescript is simply not solving that.
- netdur 6y agothe only reason I'm using typescript over javascript is types, once I converted a huge code base, there were instances where I fed javascript wrong number of args, or just wrong type of args and it did work (failing subtly on runtime), otherwise is perfectly fine.
- ficklepickle 6y agoI also like it for not having to constantly check properties before using them. I parse the data once at the application boundary (like after an API call) and then I can use it with confidence.
- ecmascript 6y agoOk well that is true and may happen sometimes. Personally, I have just dabbled with type definitions, configs etc much more than I ever had those kinds of problems in javascript. I just feel typescript usually gets in the way, sometimes in a good way, but all too often in a bad way. Plus my main gripe with typescript is that microsoft owns and controls it so I won't use it just because of that.
- bbmate 6y agoRecently I think Microsoft is a very good open source supporter. So it isn't a problem for me. I also feel Typescript is good, but sometimes it is hard to use because of so many typing. It needs VScode always for auto complete helper. I remember javascript as an old good days...
- ecmascript 6y agoWell I don't care so much about Microsoft per say, but I try to avoid any tech from any big tech company. I don't like their dominance so I'll rather use alternatives.
- s_fischer 6y agoI made this discovery just yesterday. I tried converting a tiny side project from vanilla JS to Typescript because I wanted to see what all the hype was about. I had this idea in my head(perhaps naively) that I would catch an edge case/silent error or two in my application that I did not know existed prior to implementing static typing. Instead, I spent a whole bunch of time wrestling with the tooling and configs in order to get my (previously working) code to compile. I'm not trying to make the conclusion that typescript is bad, as I've hardly even used it at this point. But from my experience, it's not exactly the 1:1 from JS that some people argue. My takeaway is that there can be real value to be had from static typing in JS, but it might not always make sense to introduce the tooling overhead for tiny codebases that are developed by a single maintainer.
- ecmascript 6y agoIt's probably useful, like most stuff that comes out from big companies, if you are a big company with big teams. I do not work for a big company and I will probably never do it again so Typescript is definitely not for me. People go in this trap again and again, including myself. "Oh this FAANG uses this, it must be great and suitible for us" - no, it's suitible for them because they have completely different problems than you and have to do stuff in a much more complicated way than you need to.
- root_axis 6y agoBecause of static types. If you're building software that needs to be maintained over time, types are always preferable to a lack of types. This is because types codify the shape of application data structures that exist whether you explicitly define them or not. A lack of types is a form of technical debt that every future developer has to repay as they discover application data structures through trial and error.
- fulafel 6y agoObviously there are a lot of people who disagree. I'd expand but it would feel too ad hominem due to your nick :)
- laurent123456 6y agoRefactoring a large code base is way easier with TypeScript than it is with JavaScript for example. Getting familiar with such a large codebase is also easier with TypeScript thanks to good auto-completion in editors like VSCode.