No, it is slower than JS but it can be compiled to JS. The point of typescript is bringing static (or generally talking, predictable) types to variables, so that treating erroneously a number as a string should be more difficult. In a large codebase, it’s easy to make mistakes and debugging is not instantaneous but it needs time. Typescript helps here. You write more code but it helps you out later
I have some knowledge on C# and I’ve used C++ before… I really like C# (Ik it’s not technically fully statically typed but it gets the point across), ASP.net just has too many hoops to jump through just to get a project started, it’s kinda annoying.
I don’t have much experience with TS, but in other strongly typed language it goes even further than string vs number.
For example you can have two numbers Distance and TimeInSeconds and even though they are both numbers, the type system can make sure that you won’t do distance+time.
It can also let you do distance/time and return Speed type.
It will prevent many logical errors even though everything is technically a number.
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmerhumor@lemmy.ml
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
Posts must be relevant to programming, programmers, or computer science.
No NSFW content.
Jokes must be in good taste. No hate speech, bigotry, etc.
No, it is slower than JS but it can be compiled to JS. The point of typescript is bringing static (or generally talking, predictable) types to variables, so that treating erroneously a number as a string should be more difficult. In a large codebase, it’s easy to make mistakes and debugging is not instantaneous but it needs time. Typescript helps here. You write more code but it helps you out later
TS syntax is still the most cursed thing I’ve ever seen
Then it just sounds like you’ve not written any typed languages yet
I have some knowledge on C# and I’ve used C++ before… I really like C# (Ik it’s not technically fully statically typed but it gets the point across), ASP.net just has too many hoops to jump through just to get a project started, it’s kinda annoying.
I don’t have much experience with TS, but in other strongly typed language it goes even further than string vs number.
For example you can have two numbers Distance and TimeInSeconds and even though they are both numbers, the type system can make sure that you won’t do distance+time.
It can also let you do distance/time and return Speed type.
It will prevent many logical errors even though everything is technically a number.