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
-
john-doe9405yTypescript is nice. I started using it in small libraries that then get used in js code.
-
Root826005yTypescript isn't javascript?
What.
He sounds more senior citizen than senior dev. 🙄 -
@Root Typescript is Javascript. But the inter between compiling TS code into JS catches many things for you which would otherwise go unnoticed by people but the language feels so different in many regards. I can see why the senior dev would think they are different but I can't forgive the idiot for not taking time to investigate and find that it would have been a sane solution
-
josap2115yMy answer would have been: ok sure, should we get rid of all that ECMAscript nonsense as well?
-
john-doe9405y@AleCx04 typescript is not js. Just as c++ is not c.
But the essence of both languages is the same, that is, it's engine.
People forget that JS is a language designed to run on a single thread VM with an event loop and WorkerThreads. TS is the same, but with static typings.
Purescript is not Haskell, but both share so much, that purescript is closer to Haskell than JS. -
john-doe9405y@StefanH you can try fp-ts in TS or folktale in JS and once you feel comfy with functional crap on JS you might be readier to delve into elm.
Just my opinion. Cycle is good for this experiment too. -
@galileopy I am sorry but that is just wrong. TS IS JS, it is a direct superset of it. This is not one of those "educate me" situations, I do not mean to be cocky or anything, been using it since inception and I am quite aware of what makes a language different from others.
C++ is also a valid superset of C btw. Not saying that they are equal and the same since there are capabilities added to one language over the other(obviously) but saying that TS is just JS is not wrong, of course it has a type system, but when writing it you can completely ignore it and just type JS and you will be fine. -
@Root i dunno why i made it sound like that. I know you do, I am sorry, was trying to add to it but my mind went into fart mode :P
-
john-doe9405y@AleCx04 juice is not water. It has water.
Valid TS is not necessarily valid JS. But if you want to forgo basic set theory, go ahead. It only hurts you. -
@galileopy logical fallacy, and a pretty hardcore one. I don't think your concept of strict superset is what you think it is.
Js will be valid TS, the same does not necessarily have to apply to the base implementation which is JS(in this case). That is what a strict superset is. -
john-doe9405y@AleCx04 well we have different definitions of what 'is' means.
You say a strict superset is the subset.
Sadly that doesn't correspond to what I've learned. So you'll always be wrong in that universe. And I'll always be wrong in the universe you're now.
Also I never said that JS is not TS.
I said TS is not JS. -
@galileopy universes? what, no. much rather just aspects of the comparison.
is ts js in the sense that ts is a superset of js? yea
is ts not js in the sense that good ts code uses a totally different "code paradigm" (or whatever you want to call it). yes also.
this "is ts js" discussion is a semantics jerk off. -
I'm just a guy who rants about ts and js
Turns out, I added fuel to a burning thread. -
@galileopy @jesustricks it kinda is, specially since I think we are both saying the same thing, but in different ways and made it a small argument. @galileopy is not wrong tho and he is right, he did say ts is not js, which is definitely true. When I said that it is just JS was in the sense that it is build in JS and compiles down to TS(i guess transpiles would be a better term, someone correct me if i am wrong on that)
Me: We should use typescript to enhance our readability and productivity.
Senior dev: No... We don't want to use any other languages except JavaScript.
(A month later)
Too many catch, race conditions and hidden bugs left. 5 hours of debugging
rant