• starman
          link
          fedilink
          English
          arrow-up
          1
          arrow-down
          1
          ·
          1 year ago

          Give me one advantage of language that isn’t strongly typed

          • Kogasa
            link
            fedilink
            arrow-up
            3
            ·
            edit-2
            1 year ago

            Fluent polymorphism via duck typing. It’s useful when you’re treating objects as a collection of properties, and therefore it’s not their type that matters but which properties they have. Types can still be used to label common collections of properties but it’s less painful to talk about objects that are “like an X but with/without certain properties,” or where some properties themselves have a different shape, etc. This is applicable to web APIs, not just because of JSON, but because it allows to define both very rigid and very flexible schemas without much overhead or repetition. See the OpenAPI specification.

    • exscape@kbin.social
      link
      fedilink
      arrow-up
      24
      ·
      1 year ago

      CSS is used to create the design, basically the look (colors, layout and so on), but no substance.
      JavaScript is used to implement code and logic.

      HTML + JavaScript would typically (since you’re supposed to use CSS to create colors and design) look very dull, thus the black-and-white Oppenheimer.

        • exscape@kbin.social
          link
          fedilink
          arrow-up
          2
          ·
          1 year ago

          Sure, but setting the .style attribute could really be argued as using CSS, just with a different interface. W3Schools refers to this as “inline CSS”.