Earlier quoted context omitted.
Typescript taught me that I actually don’t care about types and all I care about is the shape of data. In most cases I think of types/interfaces in Typescript as strict data definitions. A function takes in a collection of data; as long as the data matches the shape I expect, don’t care what the data represents.
> Typescript taught me that I actually don’t care about types and all I care about is the shape of data. Seconding leafario2 here, that's exactly what types do: They give guarantees about the shape of data. Maybe what you meant was you don't care whether an object is of type Customer or Supplier , as long as it has an element/field named address . That's called "structural typing" (as opposed to "nominal typing"). Fe…
Typing Is Hard
131–134 of 134 posts
Re: Typing Is Hard
#132Re: Typing Is Hard
#133Earlier quoted context omitted.
That's correct, but seems irrelevant?
It's very relevant. In fact I would argue that type systems only address the simplest possible errors and do absolutely nothing about the most complex, time-consuming errors such as those related to unpredictable state mutations caused by multiple events being processed in parallel or having different parts of the code operate on the same instances. In fact, I would argue that static typing encourages developers to d…
Furthermore,
> Dynamic languages encourage more modular, more interchangeable code.
Have you ever used an ML or another typed language with an actual module system? It makes these dynamic languages look duct-taped in comparison.
Re: Typing Is Hard
#134Earlier quoted context omitted.
Yep, correct! Thanks :-) Btw i love "out-floop" and I'm going to try to find applications for it.
Perhaps via reference to https://en.wikipedia.org/wiki/BlooP_and_FlooP ? EDIT: though, in that context, I would parse "out-floop" as a transitive verb meaning "to FlooP more, to a greater extent, or faster, than ", rendering its opposite actually "under-floop".