3 ms·
I'm not sure why the article hates on types that much I mean: - schemas are types - types do not require encapsulation ("even" in java "plain old data" type w
by dathinab 6y ago
I'm not sure why the article hates on types that much I mean:
- schemas are types
- types do not require encapsulation ("even" in java "plain old data" type which do not give any encapsulation are a thing)
- many popular languages without static type ascription have by now added optional type ascription or there exists a derivative which do so which are recommended for larger projects (e.g. TypeScript and python3 type hints)
- I can understand why people might not like nominal type systems, or to many explicit type ascription.
- In my experience when maintaining & changing software having a proper type system is making the task easier and faster (if the type system is not abused, idk how common type system abuse is in Haskell). And in my experience non nominal type system as seen in TypeScript are already helpful making changes easier then in JavaScript. But it's still harder to change (larger projects) in TypeScript then e.g. in Rust (assuming the type system was not abused!!).
- To be fair abusing type systems is in my experience often worse then not having a nice type system.
- cannabis_sam 6y agoI used to hate on types, largely because I had mostly learned to program in Java, where you hade to write the name of the type twice just to initialize an object, and just the general tendency in Java to rely on explicitly specified types everywhere. I felt that the value gained from all this extra work was minimal, so when I got into Python it felt like being unshackled from utterly pointless chains. After around 10 years of developing in Java and Python/php, I learned Haskell, and realized that types are only shackles in languages that refuse to utilize them in an efficient and useful manner (i.e. type inference instead of endless type specification or type casting at every point of mutation. And don’t even get me started on the destructive horrors of automatic/implicit type coercion..) In Haskell, types feel like the nubs on jigsaw puzzle pieces, guiding you to what (potentially) fits together, which drastically reduces the amount of programming details you need to keep in your head, so you can focus on the actual, fuzzy, real-life semantics of the system your developing.