Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Programming

Ruby on Rails Creator Removes TypeScript From Turbo Framework, Upsets Community (devclass.com) 54

Ruby on Rails creator David Heinemeier Hansson has removed TypeScript from the forthcoming version 8 of the Turbo framework, saying he has "never been a fan," but many Turbo users have protested that the decision was rushed and the change is unwelcome. From a report: A comment on the GitHub pull request that removes TypeScript states that this "is a step back, for both library users and contributors." This comment has -- at the time of writing -- 357 likes and just 8 downvotes, suggesting wide support. Turbo is a framework for delivering HTML pages intended to "dramatically reduce the amount of custom JavaScript," and is sponsored by Hannson's company 37signals, whose products include the Basecamp project management platform and the Hey messaging system. Turbo is the engine of Hotwire, short for "HTML over the wire," because it prefers sending HTML itself rather than JSON data and JavaScript code.

Although Turbo itself is not among the most popular frameworks, Ruby on Rails is well-known and used by major web sites including GitHub and Shopify. Hansson posted that TypeScript "pollutes the code with type gymnastics that add ever so little joy to my development experience, and quite frequently considerable grief. Things that should be easy become hard." The community around the open source Turbo project though is for the most part perplexed and disappointed, not only by the change itself, but also by the manner in which it was made.

This discussion has been archived. No new comments can be posted.

Ruby on Rails Creator Removes TypeScript From Turbo Framework, Upsets Community

Comments Filter:
  • I guess just install some third party library if you can't live without the typescript utilities? I haven't used rails so the ones who know it can comment on how hard that would be...

  • so ... (Score:4, Insightful)

    by znrt ( 2424692 ) on Thursday September 07, 2023 @05:54PM (#63830654)

    "pollutes the code with type gymnastics that add ever so little joy to my development experience, and quite frequently considerable grief. Things that should be easy become hard."

    i can relate, even if i would do with considerable less dramatism.

    and i can also see why type addicts get upset, they get easily scared by their own code. and it still doesn't matter a bit.

    • by mysidia ( 191772 )

      and i can also see why type addicts get upset, they get easily scared by their own code. and it still doesn't matter a bit.

      Well, there are huge reasons for picking Typescript, and the change is an Issue because it's a major impact users of the framework -- You don't just change things like that randomly - It's like what if MySQL decided to Drop SQL as a supported query language.

      And DHH is Ludicrously arrogant here, as they won't even engage their fellow developers in a reasonable fashion. "All the lov

      • by Anonymous Coward

        It's like what if MySQL decided to Drop SQL as a supported query language.

        MySQL only ever supported a weird and broken subset of SQL.

        • by teg ( 97890 )

          It's like what if MySQL decided to Drop SQL as a supported query language.

          MySQL only ever supported a weird and broken subset of SQL.

          And, at times, only supported that by not failing - but ignoring the actual implementation of the constraint.

        • There a few options (most notably --ansi) that get you pretty close to a standard SQL. Certainly closer than most other SQL vendors.

      • And DHH is Ludicrously arrogant here, as they won't even engage their fellow developers in a reasonable fashion. "All the love and appreciation to contributors who would prefer TypeScript. This is one of those debates where arguments aren't likely to move anyone's fundamental position, so I won't attempt to do that."

        Rob Pike still takes the cake here when he wrote about why Go hadn't won over C++ developers. At the end of his post, he summarizes with a conclusion:

        C++ programmers don't come to Go because ...

    • Dynamic typing makes a lot of things easier. This is really easy to see in things like unit tests, where Java developers tend to use dependency injection and other type gymnastics to get their objects to play well together, and even then have trouble testing everything. In Ruby it's relatively trivial to test every line of code (unless you're doing weird hardware stuff) because of the dynamic nature of the language. You can stub out anything, and remove boilerplate code in many different ways.

      The advantag
      • Re:so ... (Score:4, Insightful)

        by north_by_midwest ( 7997468 ) on Friday September 08, 2023 @01:55AM (#63831500)

        I’m sorry but what the heck are you talking about? Static typing reduces the number of tests you write because the type system itself guarantees thing like a toString() call actually returns a string. Dynamic typing can help you test really untestable code due to its flexibility, but stubbing isn’t exactly an unsolved problem in static land.

        • but stubbing isn’t exactly an unsolved problem in static land.

          Yeah but it sucks.

        • So, you avoid writing trivial tests at the expense of making important tests a nightmare to write. Sounds like a big lose to me.

        • by Tablizer ( 95088 )

          If "toString()" doesn't return a string, it's coded wrong, and I'd write my own wrapper around it if I needed it often.

    • "pollutes the code with type gymnastics that add ever so little joy to my development experience, and quite frequently considerable grief. Things that should be easy become hard."

      i can relate, even if i would do with considerable less dramatism.

      and i can also see why type addicts get upset, they get easily scared by their own code. and it still doesn't matter a bit.

      Reminds me of all the BS I went through in school suffering through a class in Object Oriented Programming

      Talk about a programming language that was filled with programming gymnastics and output such obscure and obtuse code that I'm surprised it actually compiled.

      I will take the teeth-pulling of working in Assembly or the hassles of working C over the insanity of working in any object-oriented language.

      • Most OO languages are multi-paradigm. Nothing stopping you from writing in a different style.

        • by kackle ( 910159 )
          I think what he's saying is "Why use the language, then?" I know C well, but know little C++. What bothers me is that I often have to dig into other people's (C++) code, where I am not an expert. I like how another Slashdotter put it: 'They say you only use about 40% of C++, but everyone knows a different 40%.'
  • by Anubis IV ( 1279820 ) on Thursday September 07, 2023 @06:38PM (#63830758)

    Even if we set aside any discussion about whether type strictness is good or bad, the PR in question was only open for 2-3 hours before it was approved and merged by David. Mind you, this was done over technical objections to the PR itself that were unrelated to type strictness, including from contributors to the project who are more prolific than he is (I saw it reported thatsome were even his coworkers, but I haven't confirmed that). Mind you, there are also dozens of existing PRs published by external contributors that are no longer able to be merged.

    This is not how you run an open source project. This is not how you treat your coworkers. This is not how you communicate shifts in the direction of a project. This is not how you do a PR.

    Reasonable minds can disagree on whether or not dumping Typescript was the right choice (even if you did want to do it, why not JS+JSDoc, as was pointed out in the PR comments?), but reasonable minds should all be in agreement that how he handled it was wrong.

    • Typically I'd say there's money behind unpopular decisions like this (.NET has had its own controversies in the rare cases where corp needs have apparently overridden what OSS community expects as healthy OSS), but DHH has displayed a bit of a "it's my ship, get on board or get off" mentality in the past -- would not be surprised if it's mostly just from him.

    • by beuges ( 613130 )

      If you're working with Rails, then this is what you have to deal with. DHH is unapologetic about it
      https://dhh.dk/2012/rails-is-o... [dhh.dk]

      I'm surprised there are so many people using Rails, when his attitude is basically "you will use it how I built it and if you don't like it then go away". Which is entirely fair to him to be sure - it is his project after all. But anyone who's adopted Rails should already know what they signed up for and shouldn't at all be surprised at this turn of events

      Even if he wasn't as c

      • His decisions and vision are what provide pretty much all the value of Rails. Building by consensus or trying to please everyone undermines the whole idea of having an opinionated streamlined framework for solving a specific set of problems.

        • It's fine to be a benevolent dictator over a system you created. Emphasis on "benevolent". My point above is that his actions here were not benevolent. They were actively hostile towards the community, the project's maintainers, his coworkers, and more, and while engaging in bullheaded actions is both his prerogative and right, that doesn't make it right.

          Plenty of us are in leadership positions where we need to lead people in a direction without first building consensus. There are right ways to do that and

    • This is why I don't use Rails. Large % of asshole RoR maintainers.
    • the PR in question was only open for 2-3 hours before it was approved and merged by David

      If the submitter of a PR has the power to do so, they will approve their own merges. Depending on the project's structure and practices, that could be a bad or a good thing. But length of time as a PR is rarely an indicator of a bad merge.

      this was done over technical objections to the PR itself that were unrelated to type strictness, including from contributors to the project who are more prolific than he is (I saw it reported thatsome were even his coworkers, but I haven't confirmed that).

      That part is troubling. If there are valid technical objections, then they should be worked out. That or it's time for a new major version number due to the breaking change. (Which seems to be the case here according to TFS.)

      there are also dozens of existing PRs published by external contributors that are no longer able to be merged.

      If the changes from one PR are accepted befor

  • and the benevolent dictator of Ruby agrees with me

  • by PhrostyMcByte ( 589271 ) <phrosty@gmail.com> on Thursday September 07, 2023 @07:03PM (#63830816) Homepage

    This change might not affect your rockstar devs who know the project in and out, but it will absolutely reduce the quantity of new contributors, reduce the quality of contributions, increase time spent in PR, and make onboarding take longer for their paid devs.

    It feels like this guy posts some contrarian bad take every year. I guess this is right on schedule.

    • True that. Mr. F1 driver can flip his hair and pose. Meanwhile, the rest of the civilized world will cooperate and balance concerns with at least a shred of egalitarianism.

      And maybe Amazon should acquire Basecamp as they seem to share common values.

  • by ndykman ( 659315 ) on Thursday September 07, 2023 @11:50PM (#63831348)

    Honestly, the amount of people that seem completely allergic to typing is really odd to me. Yes, the code does take longer to write. Yes, that can seem just like "ceremony", but code is read and updated way, way more often than it is written. Strong typing is a useful tool to made code more understandable to others.

    • by sinkskinkshrieks ( 6952954 ) on Friday September 08, 2023 @04:44AM (#63831714)
      Strong typing is how to catch defects BEFORE they happen. GFL chasing down what modifies what dynamically in JS or Ruby.
    • When I work in C++, occasionally the typing annoys me but mostly it's beneficial. When I'm working in PHP/JS I tend to look at the stuff I'm writing and realise that if it was typed this would have been really awkward. Horses for courses and all that. Weakly typed languages are beneficial when you're massaging data from one thing to another, when correctness is really not a big deal. Which describes a whole lot of web stuff which is usually taking back end data provided by a database and massaging it into a

  • Shocker. I'm glad there are vastly different frameworks out there to choose from, but so long as Mr Rails himself is dumping on non-Ruby languages, I'd just like to say:

    There is no coding hell I've seen worse than using Rails for anything remotely challenging outside of a MVC style website (and even then, well, pretty much every language has a reasonable MVC framework you could use). Code by convention is just miserable, miserable awful stuff to me. "What is the Rails way to do this?" is not where I want to

    • Ahaha. So true. The problems with RoR are: lack of typing in Ruby (rbs and sorbet are shit), it's slow, it's dying so the communities are shrinking, lots of abandoned shit, Not-Invented-Here/Reinvent-the-Wheel syndrome, arbitrary/capricious churn, and some real jerk maintainers in Rails and in Ruby.

      If you want job security, stick to Elixir/Erlang, Rust, Go, TypeScript, Clojure/Java/Kotlin, and Swift. PureScript, typed Python 3, and Haskell as honorable mentions.

    • I'm not even a developer (sysadmin by training and experience), and I learned to avoid RoR whenever possible early on. Getting a Puppet server working using mod_rails in 2011 was a ton of "X depends on Y, but Y can only be a version *after* a.b.c, meanwhile X also depends on Z but Z requires a version of Y in an entirely disjoint set from what X requires⦠oh hell, I have to use old versions of X and Z to have them both agree on a version of Y they like, don't I?" Querying other folks who suppor
      • it was made worse by a general attitude in the Ruby community of "that version of that gem is *six months old*, why would anyone still be using that garbage?"

        That same general attitude is applicable to most software projects these days (proprietary or OSS)....If you're not using their latest bleeding edge code they want nothing to do with you. Unfortunately, they also have a tenancy to make this demand of constant upgrades while also throwing breaking changes in to the same "upgrades" haphazardly. Leading to many end-users having to make a hobson's choice of upgrading to a version that breaks / removes support for something they need, or be stuck using vulnerab

  • by sinkskinkshrieks ( 6952954 ) on Friday September 08, 2023 @04:42AM (#63831712)

    TypeScript has been proven to be one of the most reliable and productive languages. https://web.cs.ucdavis.edu/~fi... [ucdavis.edu] [pdf]

    Furthermore, TS can be reduced to JS simply by removing annotations. It's a strict superset of JS.

    Oh well, the Basecamp people will always be medium-sized fish in a tiny fishbowl, not listening to users, and toiling away in obscurity on that which doesn't matter.

  • by WDot ( 1286728 ) on Friday September 08, 2023 @08:52AM (#63832118)
    When I find myself fighting with types in Typescript, usually what I find is that I’m actually not thinking correctly about what the code as written is actually doing. Typescript is intransigent upfront so that down the road I don’t have nearly as bugs at runtime. I don’t use Turbo, but I hope this doesn’t become a trend. I now have several software projects that make heavy use of Typescript, and I have gotten used to the existence of a “types” package being a safe assumption.

Always look over your shoulder because everyone is watching and plotting against you.

Working...