While familiarity is a perfectly fine reason, it is really a bad sign if it is the only reason
Can I know for what typescript is used for with a realtime example in which it is being used
Hey, team members can I be your friend?
I am from Pakistan.
I am 13 years old teenager trying to become fullstack developer
I have learntadvance HTML basic CSS Medium Javascript and basic Node JS
@MuhammadSafeerHassan its a general purpose programming language, you could use it for almost anything as long as the tool/environment you want it to run for, supports it
95% of what you could do in Typescript, you can do in Kotlin, C#, Python, or Rust just as well
and the other way around too
dont let these websters fool you into thinking that Typescript is the only language that runs on the browser
if your goal is a job, try looking what languages/tools/services companies use in your area and learn those
for me for example, the primary demand near my place is Java and C#, so you will have a harder time looking for a job with Python
also, considering you are quite young, maybe the stuff they use now, they wont use in 5 years
but that chance is quite slim
2 hours later…
1:51 PM
@Wietlol I’ve always looked at Typescript as some strange Javascript alternative that writes examples of functions for your code editor 😂
I’ve never actually used typescript before lol.
I look at Typescript as an attempt to describe how horrible Javascript really is
and it does quite a good job at it as well
I would swap it out any time for almost any other language though
You don’t like Javascript? How?
the fake type system gives a false sense of security for a dev that is used to statically typed languages
I built an AI desk robot that does anything I ask it and even plays videogames sometimes (and I did it with pure Javascript) so Javascript is pretty great lol
Javascript is just too easy to make mistakes with, it has too many different ways to do the same thing, it bulks up piles of legacy behaviour, and you constantly have to look for support in the target environments
1:55 PM
How about Node.js wise? No need for browser support there lol
and the tooling is also not great
Frontend devs were so preoccupied with whether or not they could run Javascript in the backend, they didn’t stop to think if they should :P
but jokes aside, why would I choose to use NodeJS?
Because it’s a huge group of developers who make awesome packages so you can literally program whatever you want with it without learning an extremely complex language like C#
the primary reason to use NodeJS is familiarity
if you are already familiar with JS/TS, and you, as frontend dev, want to do backend stuff, NodeJS is the way to go
but, while familiarity is a perfectly fine reason, it is really a bad sign if it is the only reason
as someone who learned about a proper type system first-hand, anything that doesnt have a proper type system by itself is a pain to work with
For me, it’s the nostalgia of Node.js when I used to program these huge projects on a little Raspberry Pi, and it’s because I hate Java or C
And running a simple “npm i package” is so simple to install any package you want
I’m an NPM package developer myself. I like that you don’t have to pay for anything and it’s so easy to build a package. They usually get lots of downloads too
its funny, because the things you listed are pretty much the same in other major stacks
2:04 PM
Ok, I’ll see you later. Gotta get out of bed where I am lol. Have a good day (or night) ;)
Lol, really? I thought that was a more personal opinion but ok.
for example, in C# or Java, there are also a huge group of developers with many extremely good and interesting packages freely available
and installing those packages is done pretty much in the same way, either just edit the package.json (pom.xml, build.gradle, *.csproj, etc) or using the command line or even user interface of your IDE
hosting is also free, the only thing that is a bit special is in Java, where you have to make a request to the maintainers of the central package repository to review your package to host it there
on the bright side, it does mean that you can trust that the packages from the central repo are safe to use
on the down side, you cant just upload stuff
and the code has to be shared with the maintainers
2:19 PM
@ParkingMaster can it make me a sandwich?
2:30 PM
@Cerbrus let me ask…
Nguồn:: TS – Conversation in JavaScript