JavaScript
-
It makes sense though
-
So, just don’t use JavaScript?
Yeah! Wasm is a thing. At least rust and go are pretty neat in the browser lately.
We should leave that pile of semantics and just go further with web development
-
Since it needs to be compiled to JavaScript in order to be used, I kind of consider it a different language. Yes, it's a strict superset of JavaScript, but that makes it different.
wrote on last edited by [email protected]That's your prerogative, but it honestly doesn't make sense. Typescript adds almost no functionality to JS (and the few pieces it adds are now considered mistakes that shouldn't be used anymore). It only focuses on adding typing information, and in the future you'll be able to run TS that doesn't use those few added features as JS (see the proposal).
You can also add the TS types as comments in your JS code, which IMO shows that it's not a different language.
-
That's also my understanding: "Javascript is great because you can use other languages and then transpile them to JS."
wrote on last edited by [email protected]JS itself is great, I prefer it to most other languages due to the flexibility that it allows. Adding types through TS to safeguard against footguns doesn't mean you're not still using JS. You can also add the types using comments instead if you prefer it, which means you're actually writing raw JS.
-
It makes sense though
.... It does?
-
The correct way to do it is to load a 500mb library that has an add function in it.
wrote on last edited by [email protected]Point taken but the one I use is only ~200k for the whole package, ~11k for the actual file that gets loaded
-
I know nothing about javascript, what is wrong with using + for math? perhaps naively, I'd say it looks suited for the job
wrote on last edited by [email protected]The native arithmetic operators are prone to floating point rounding errors
-
So all you've mustered is some lame-ass ad-hominem? Have a good day
No, it just so happens I have a minute to talk about our lord and saviour JS. What is His holy and sacred mission?
-
This here is my absolute favorits way to diss someone. Send the a wikipeda link and bam!
-
No, it just so happens I have a minute to talk about our lord and saviour JS. What is His holy and sacred mission?
wrote on last edited by [email protected]Ah, you're a troll. I see. Blocked.
-
Ah, you're a troll. I see. Blocked.
You asked for it, smart ass
-
That is just the tip of the iceberg:
so plus coerces into string if not number, was that so hard?
-
This has got to be baNaNa
-
It makes sense though
It does to some degree.
- "11" is string, 1 is an int, because strings can be added (+) convert int to string and combine: "11"+"1" = "111"
- "11" is string, 1 is an int, because strings cant be subtracted (-) convert string to int and combine: 11-1 = 10
I'm not into JS so I don't know how it takes priority. ints can be added too, so I guess its basing it on the first variable which is compatible with the operator: in the first case string, in the second case int.
If this is how it works, it makes sense. But imo its a case of the designers being preoccupied with whether or not they could, they didn't stop to think if they should.
-
This post did not contain any content.
What no type safety does to an MF...
-
This post did not contain any content.wrote on last edited by [email protected]
javascript is to web developers what powerpoint is to sales people
-
This here is my absolute favorits way to diss someone. Send the a wikipeda link and bam!