Attenuation theory

There were many problems with dynamically and statically typed languages. However, in my opinion, while statically typed languages ​​let the compiler (or interpreter) know a little more about your intentions, they only barely scratch the surface of what can be transmitted. In fact, some languages ​​have an orthogonal mechanism for providing a little extra information in annotations.

I know strongly typed languages ​​like Agda and Coq, which are very insightful about what they allow you to do; This is not very interesting for me. Rather, I wonder what languages ​​or theory exist that extend the richness of what you can explain to the compiler about what exactly you intend. For example, if you have a mutable vector, and you turn it into a unit vector, why can't your compiler choose a unit-vector form of vector projection instead of a more expensive general form? The type has not changed - and the work needed to create all the necessary types will be disabled even in a language with surprisingly easy typing, such as Haskell - and yet it seems that the compiler can be empowered to know a lot about the situation.

Some languages ​​already include things such as outside the standard type theory or within one of its more advanced branches?

+5
source share
1 answer

languages ​​are available with the full type of the turing system. which means your types can express any computable property. for example, a list of length 6 or a valid credit card number. however, most major languages ​​use simpler types of systems. haskell is considered a very powerful system type

0
source

All Articles