|
|
|
|
|
by ReflectedImage
1300 days ago
|
|
I'm not sure many languages support the introduction of types such as: * An integer that is sum of two primes. * A string that is created between the hours of 2 pm - 4 pm on a Tuesday. * A dictionary who's fields comprise a valid tax return. What do you mean by future proving? If the new version of the code doesn't ship by 2 pm today, the company goes bankrupt and there is no future for the code. |
|
Any language with types can enforce any proposition you can reliably check, which you run as part of the type's constructor. There are multiple ways to do this, for instance in pseudo-ML:
> * An integer that is sum of two primes.
> * A string that is created between the hours of 2 pm - 4 pm on a Tuesday. > * A dictionary who's fields comprise a valid tax return. > What do you mean by future proving? If the new version of the code doesn't ship by 2 pm today, the company goes bankrupt and there is no future for the code.Shipping broken code will not save the company from bankruptcy. It's also a myth that dynamically typed languages will get your code out faster.