That looks like a minified webpack (or something similar) output, not a transpiled typescript output. Also the code is not valid.
Typescript
Submitted 1 year ago by LinearArray@programming.dev to programmer_humor@programming.dev
https://programming.dev/pictrs/image/1e7ddae8-cd75-4972-883b-d8896ee82890.png
Comments
rikudou@lemmings.world 1 year ago
ptz@dubvee.org 1 year ago
You should see what scary C code turns into (shudders)
SomethingBurger@jlai.lu 1 year ago
I looked at it once and was scared for my life. I can’t imagine what it would look like once compiled.
excel@lemmy.megumin.org 1 year ago
What this shows is how terrible raw JS is, when all of this crap is required to fix all of the edge cases and make things actually work the way it’s supposed to.
demesisx@infosec.pub 1 year ago
I vastly prefer Purescript despite it being the road less traveled. Typescript is just a fake-ish type system on top of JavaScript. But Purescript goes MUCH further in the mission of purity and code safety.
lightnegative@lemmy.world 1 year ago
Purescript is like a modern Haskell. Completely different programming paradigm, much less accessible to your average JS developer just wanting to tighten up their code without having to learn category theory
demesisx@infosec.pub 1 year ago
I don’t know category theory and I use it every single day. Suit yourself, though.
aubeynarf@lemmynsfw.com 1 year ago
Have you tried Scala.js ?
demesisx@infosec.pub 1 year ago
I have.
I’d probably be more interested in it if I were being forced by my day job to work in the JVM. I happen to be in a situation where I am my own boss working on projects completely alone and the tech I pick comes from months of wasting time making perfect the enemy of good. I know that raises quite a few red flags but I can’t help the way that they made me. Haha 🥴
From what I’ve gathered from Joseph Gordon Bell at the (IMO best software engineering podcast ever) Co-Recursive podcast, Scala sacrifices some of the purity and safety by its dependence on the the Java cargo cult. Partly, this is also a drawback of Purescript for me (since it’s intended to compile to JavaScript) but Purescript is starting to be able to escape that fate. Also, I’m a HUGE fan of Haskell syntax.
From your perspective, what pros and cons do you see if I were comparing Scala to Purescript?
Ps. The one that is actually really making me take notice lately is OCaml for the browser.
Vast_Emptiness@programming.dev 1 year ago
Idk man. I use python ;)
baggachipz@sh.itjust.works 1 year ago
Typescript is verbose training wheels for JavaScript, change my mind
moosetwin@lemmy.dbzer0.com 1 year ago
Limeey@lemmy.world 1 year ago
If compiled languages bother you, then you’re gonna love assembly.
Xabis@lemmy.world 1 year ago
Asm is compiled too.
Gotta bust out the hex editor.
Shareni@programming.dev 1 year ago
Nah, just get butterflies
frezik@midwest.social 1 year ago
An assembler doesn’t have any of the interesting parts of a compiler.
bruhduh@lemmy.world 1 year ago
You can write asm in hex too grantmestrength.github.io/…/intel8080.html
30p87@feddit.de 1 year ago
I’d rather read ASM than … that random crap.