• redcalcium@lemmy.institute
    link
    fedilink
    arrow-up
    21
    ·
    1 year ago

    People seems to be riled up by this, but turbo is mostly used with ruby on rails, right? I’m not familiar with ruby on rails, does it actually support some form of static typing it type hints? From the blog post, the dev (which is also the ruby on rails creator) doesn’t seem to be a fan of bolting static typing into dynamic typing language.

    • tvbusy@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      19
      arrow-down
      2
      ·
      1 year ago

      RoR is very… specific. Some love it because it comes with magic. Many hate it for the same reason.

      You either knows the magic and love it, or you hate it with a passion. You never really know when (not if) your change will break the system because it’s supposed to name in a very specific way that work by, again, magic.

    • umbraroze@kbin.social
      link
      fedilink
      arrow-up
      12
      arrow-down
      2
      ·
      1 year ago

      In Ruby, the convention is usually that things are duck-typed (the actual types of your inputs don’t matter as long as they implement whatever you’re expecting of them, if not, we throw an exception). Type hinting could be possible, but it basically runs contrary to the idea.

      Now, Ruby on Rails developers are expecting some kind of magic conversion happening at the interfaces. For example, ActiveRecord maps the database datatypes to Ruby classes and will perform automated conversions on, say, date/time values. But from the developer perspective it doesn’t generally matter how this conversion actually happens, as long as there’s something between the layers to do the thing.