Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Crismon2363yYour comment doesnt make sense. What should JS be capable of that TS isnt? TS is JS. You can use it but you dont have to, you can opt out on any part of the way.
Also I do not understand your problem? The compiler is too slow for you (which I doubt)? Type system is not good (which I disagree with)?
If you have really worked with big or complex projects you should see the benefit that it brings. Big/complex projects in vanilla JS are nearly impossible to maintain in a timely manner.
Working on a vanilla freelance gig currently and 80% of bugs could have been prevented by TS. Its not even complex or big. -
Crost41083y+1 as above. Rant makes no sense.
But also isn't it transpiles ahead of time? So it's just JavaScript at runtime.. and in my experience it runs very fast. -
The scripting language isn't meant for bit complex projects?
What a surprise :o -
Seph693yI've worked with Typescript soooo much. Sooo friggin much, I guarantee you I'm upper 1 percentile at this point.
I've also been programming for a decade since before Typescript was around.
Typescript pretends to be a super set of Javascript, but it simply is not.
https://medium.com/@shadywillowcree... -
It seems your issue is about the fact that TS doesn't let you have complex enough types, while JS let you do whatever you want.
In the end it just makes sense, and in a good way. TS is designed to make big codebases more readable, not to give JS a steroid boost. Of course it's gonna put some constrains on it in order to keep things consistent.
But if you want something that can handle more complex types, i think a much better choice would be a language that was thought around it from day 1, not a supraset of a dynamic wild-west of types language. -
Crost41083y@KennyTheBard constraints are not a bad thing as you say. Structured programming, Oop, functional, are all forms of constraints...
-
@craig939393 Of course they are not, but i was trying to argue why TS doesn't let you do so much magic stuff as JS lets you, despite being its superset.
-
Seph693yConstraints are not always a bad thing, totally agree.
Where this fails -- though -- is that some constraints are more tradition than they are valuable. -
ars140753yI've been using it for a while now and it's really just an attempt at making JavaScript less horrible. There's only so much turd polishing you can do.
-
ryios103yI'm working on a pretty massive project now, haven't really run into anything typescript can't do. If you leverage the full power if it's utility types, unions, and intersects, you can define a type for anything and I have a hard time finding something I can't define in TS, and if I did I'd probably just "any" it.
You can even define interfaces and implement them via keyof T so you can implement them as any type..
It's extremely powerful.
Entertain us with an example of the problem? Maybe someone else knows how to do that in typescript?
My biggest TS rant is that most of it is design time semantics and useless at runtime, and it's confusing to a lot of developers... I'm tired of explaining that "interfaces" don't exist in JS, and that if you http deserialize a thing to an IThing that doesn't mean IThing will adhere to that contract...
Typescript doesn't stop you from having to write types defensively. Like having a class constructor drop off invalid fields. etc.
Related Rants
I fucking give up. Typescript is not meant for complex projects. It's meant for simple projects that are big. There's no way forwards, no matter how much I try to simplify my types I simply can not get the typescript server to stop lagging out the moment I do anything complex. It can't fucking do it, it just can't. And that sucks really, really hard.
I'm so tired of finding the ceiling on everything. I had a bad smell for typescript when it came out... and I never should have expected any more than this.
rant
typescript