In what way is haskells type system more helpful than the type system of another statically typed language -
I'm using Hascale for a while I understand the most / some concepts but I still understand Not coming, what is the Haskell Type system actually doing I am allowed to do this that I can not do in a more consistently typed language. I simply know easily that type in C, C ++ or Java Compared to systems in every conceivable way Haskell And the system is better, but I can not explain it logically, mainly about the difference in the type system depth between languages went typed Haskell and other statically due to lack of knowledge.
Does anyone give me an example of how the helsel type system is more useful than a type of type with a type of system. Example, which is in short and can be briefly expressed, well Will happen.
There is a number in the Haskell type system, all of the features that exist in other languages, but seldom Be collected in a single, consistent language:
- This is a sound, static type of system, which means that many errors are not guaranteed to be runtime (without the need for runtime type check) This is also the case in Camel, SML and Java, but in Lispy, Python, C or C ++) Is not it;
- This static type reconstruction, which means that the programmer does not need to write unless he wishes, until the compiler allows them to reconstitute themselves (this is also a case in Camel and SML, but Java or C Not in);
- It supports inadequate polymorphism (type variable) but also on higher types (opposite to Kamal and SML or any other production-ready language that I have);
- Overloading (type class S) (contrary to CML and SML) for this
None of these is open to discussing Heschel to make a better language - for example, when I like a lot of classes, I have quite a few camel programmers who Extremely disliked and prefer to use the module system. Haskell type system, on the other hand, lacks some features in other languages, which are beautifully supported in other languages:
- <
- Its existence type and GADT (these are both GHC extensions) ) There is no support for;
- There is no support for dependent types (contrary to Cock, Egga and Idris).
Again, whether desirable features are open for discussion in any one of these general-purpose programming languages.
Comments
Post a Comment