1. 6
  1. 3

    Using Coffeescript with Rails has real benefits, as Coffeescript code has a lot of similarities to Ruby, which means less mental “mode switching” when jumping back and forth between front-end and back-end code, which makes it feel like you’re writing in the same language across the breadth of your entire application.

    This feels like an anti-pattern imo. The truth is you are mode switching when you to between the Ruby and JavaScript runtimes, even if your syntax has become nearer. I like using parens and && around in if conditions in JS (or TS these days) — I don’t want to use Ruby syntax because I need to “mode switch” mentally, lest I think I’m using Ruby truthy semantics (even 0 is truthy) and not JS’s (even "" is falsey).

    1. 2

      I could adopt Typescript now, but I need some convincing that at some point Typescript won’t fall out of favor of something newer, faster and better. In the end, whether you’re using Coffeescript or Typescript, you’re still compiling that language to plain old Javascript, since that’s what runs on browsers and NodeJS. So why not stick to the tool that works best for you, whatever that may be?

      Once bitten, twice shy?

      1. 1

        It’s hard to chase the latest shiny bauble if you chased the previous shiny bauble and then the world changed.

        We could use more cynics.

        1. 4

          A skeptic says “I have something that works. I’m watching some other technologies and have analyzed their benefits and adoption, but I can’t justify switching yet.”

          A cynic says, “I’m clinging defensively to a passé fad and am fearful of anything else that looks like it might be another fad that will further embarrass me.”

          You are right that the way this article ends is cynical, but I believe the world needs more skepticism, not cynicism. I don’t even like TypeScript that much, but I am not persuaded the author has done their homework on it, either in terms of benefits or adoption.