News for hackers. Stuff that matters.
Re:Is TypeScript actually worth It? by sngz on Friday January 13, 2023 @03:30AM (#34365272)
try out dart, its much better than TS
Re:Is TypeScript actually worth It? by nnurmanov on Friday January 13, 2023 @03:46AM (#34365360)
Is Dart object oriented language? What is its roadmap? I know it was created by Google, but is it replacing js?
Re:Is TypeScript actually worth It? by petre on Friday January 13, 2023 @04:35AM (#34365674)
Dart is an object oriented language with automatic type inference. It's not replacing JS but it's better designed.
Re:Is TypeScript actually worth It? by sngz on Friday January 13, 2023 @06:04AM (#34366238)
Yes it's Object oriented, it was supposed to replace JS long time ago, but google kinda dropped the ball on that. I wish it replaced JS. Dart was almost dead for a long time but flutter kinda saved it. Developing on flutter for cross platform applications has been a joy to work with even though there are still a lot of drawbacks to flutter right now.

you can find their blog here where they talk about future releases and planned features https://medium.com/dartlang

Re:Is TypeScript actually worth It? by Cort3z on Friday January 13, 2023 @05:02AM (#34365839)
How is it objectively "better"? This depends on context. I am sure Dart is worse given a specific condition. I'm not bashing dart, but you cannot say that "A is better than B" without any sort of context to the statement. It's like saying "apples are better than oranges".
Re:Is TypeScript actually worth It? by sngz on Friday January 13, 2023 @06:01AM (#34366221)
much less overhead setting it up, it can be both interpreted and compiled. Troubleshooting errors in dart is a much more pleasant experience compared to Typescript. Transpiled languages like Typescript has given me so much trouble over the years at work.
Re:Is TypeScript actually worth It? by IshKebab on Friday January 13, 2023 @10:55AM (#34369501)
Dart is better in most respects. The standard library is light years ahead of JS's, the Dart tooling is fantastic, it has sound typing.

There are a couple of features that I miss from Typescript: the biggest by far is tagged unions.

But I would still pick Typescript for a web project for two reasons:

* The community is like 1000x bigger. Even though a lot of it produces extremely low quality code, there's still a lot more solid JS libraries than Dart ones.

* Debugging is slightly easier since the compiled JS code is essentially identical to you TS code. Chrome has pretty great support for Dart, but if you ever have to delve into the generated JS it is quite painful.

Re:Is TypeScript actually worth It? by caporaltito on Friday January 13, 2023 @07:14AM (#34366731)
No, it is not "better".
Re:Is TypeScript actually worth It? by sngz on Wednesday January 25, 2023 @02:15AM (#34515354)
yes it is
Re:Is TypeScript actually worth It? by c0n5pir4cy on Friday January 13, 2023 @08:36AM (#34367429)
Not that TypeScript doesn't have it's pain points but having tried Dart on an Android application recently, there are so many things I dislike about the language and it's ecosystem compared to modern TS/JS. I feel like it would have been a lot better than JS when it came out but now it's painful to use in comparison.

Definitely my preferred route for building mobile apps now though.

Re:Is TypeScript actually worth It? by ihateolives on Friday January 13, 2023 @09:45AM (#34368369)
I now actually prefer Dart for services and glue code on the backend. I'm so tired of dependabot yelling at me about my hobby projects every week that have yet another vulerability in one of their million dependancies. In Dart I make do with just a handful of deps, then build a binary and call it a day. I tried using Deno with TS, but binaries it generated where absurdly big, 70-100MB depending on the target platform. Also, Deno's --allow-X thing becomes tedious after a while.
Re:Is TypeScript actually worth It? by kreas on Friday January 13, 2023 @12:46PM (#34371164)
That's subjective and I'm sure it is for you. I personally prefer TypeScript.

I'm glad to see passionate developers keeping on both sides. That's how we grow and become better.

Re:Is TypeScript actually worth It? by sngz on Friday January 13, 2023 @05:59PM (#34375094)
that's like saying VHS vs betamax is subjective. VHS won but wasn't better. Or Minidiscs vs CD's. It's mostly due to marketing fails and people hopping onto marketing bandwagons and pre-estalbished products.

TS is more popular due to combination of google dropping the ball in defining the standards and getting others onboard with them cause they overestimated the leverage they have, failure at marketing it and how everyone is already bought into Javascript.