4 ms·
)); }); // I }); // love }); // TypeScript } } Actual code from the article above. Just added comments.
by RomanPushkin 11y ago
));
}); // I
}); // love
}); // TypeScript
}
}
Actual code from the article above. Just added comments.
- RussianCow 11y agoTrailing parents/braces seems like a bad reason to dislike a language. Ever heard of Lisp? :)
- lazugod 11y agoPresumably that's why some people dislike Lisp too.
- soapdog 11y agoIs that a valid reason? I know that personal taste plays a strong and important role but typescript is really cool.
- giancarlostoro 11y agoI didn't like Lisp for a long time because of it, I've since given up and tried Lisp. My friends don't care for Lisp probably because of that as well.
- mdpopescu 11y agoI could get over the parentheses but CAR and CDR instead of HEAD / TAIL or FIRST / REST annoy the crap out of me.
- soapdog 11y agoCAR means Content of Address part of Register and CDR means Content of Decrement part of Register. They were tied to the 36-bits nature of the first LISP machines, with 15 bits to CAR and 15 bits to CDR (plus 2 bits for tags IIRC). So its not just naming keys in a structure, those had a very low level meaning related the the implementation of the CONS cell structure in hardware.
- lgas 11y agoI have no idea about the veracity of the claim but this page[0] contends that Lisp has had first/rest since 1959. [0] https://en.wikipedia.org/wiki/CAR_and_CDR https://en.wikipedia.org/wiki/CAR_and_CDR
- empthought 11y agoIt cited the claim with a source, so presumably you could check the veracity that way.
- Slippery_John 11y agoPerfectly valid. If it's difficult to read, it's difficult to use.
- RomanPushkin 11y agoI agree. And it seems to me that it wasn't language issue, but lack of encapsulation. I also don't find those cons of using CoffeeScript convincing enough. Have these guys tried TDD? If you use TDD you'll probably find accidental overwriting out-of-scope variable in a matter of seconds. Because you should never rely on language syntax.
- smt88 11y agoThat code has nothing to do with TypeScript. First of all, it's a side-effect of JavaScript syntax, and it's also a really strange way to write code. This author's code doesn't seem simple or easy to reason about to me, partially because it's hard to read.
- tracker1 11y agoOnce async/await support make it into TypeScript, it should be a lot cleaner dealing with promises. It's already in Babel, and imho I'm fine without the typing as long as modules are minimalistic, organized and straight forward.