3 ms·
> I cant believe how much more accessible typescript is than javascript. Can you elaborate on your meaning? A language that requires transpiling by definition
by BinaryIdiot 10y ago
> I cant believe how much more accessible typescript is than javascript.
Can you elaborate on your meaning? A language that requires transpiling by definition can't be more accessible than the language it transpiles into.
> At one point in time, a 'this' bug ate up half of my day. Ever since moving to typescript, I haven't had a single 'this' bug make it past the compiler. I still don't fucking understand 'this'.
'this' can be a little complicated but it's really not that bad. I like the dry way the MDN explains 'this' [1] if you find it helpful. Even if you're using TypeScript I still think it's important to understand (TypeScript does compile into JavaScript after-all; debugging the transpiled output without chrome maps can be necessary at times).
[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- regularfry 10y ago> A language that requires transpiling by definition can't be more accessible than the language it transpiles into. It's a funny definition of "accessible" that counts C as less accessible than assembler.
- spriggan3 10y agoC doesn't transpile to assembler.
- clappski 10y agoThat's a rather arbitrary statement; C _compiles_ to machine code that maps pretty directly to an assembly language, which is normally not far off of the abstraction level offered by C. Taking the definition of transpile being translating to a language with a similar abstraction level, you're just picking hairs.