News for hackers. Stuff that matters.
Re:Why Don't People Use Formal Methods? by pasta on Tuesday January 22, 2019 @04:52AM (#18967197)
I sometimes feel this also a language or tool problem.

For example an integer. In most languages and tools this is a primitive.

But most of the time we need a specific type of integer, for example a positive natural number. You can use a unsigned integer for this but that will include a zero wich we don't want.

So maybe you can use a type/domain object for this in your code, but what about the database field or communication methods?

It all can be done but with a lot of hussle.

I think it would help if we had more primitives that would work in the complete stack.

But then the question is: should ISO 639-2 also be a primitive?

Re:Why Don't People Use Formal Methods? by patates on Tuesday January 22, 2019 @05:15AM (#18967278)
Re:Why Don't People Use Formal Methods? by Uberphallus on Tuesday January 22, 2019 @07:22AM (#18967745)
And checks on compile time are quite insightful, Ada tends to know beforehand if you're gonna run out of bounds.
Re:Why Don't People Use Formal Methods? by chii on Tuesday January 22, 2019 @07:38AM (#18967813)
Or, don't split between primitives vs objects.

I think it's a mistake to make thet distinction in many language's design.

Re:Why Don't People Use Formal Methods? by Retra on Tuesday January 22, 2019 @10:22AM (#18968850)
The result of that will not be easy to use objects, but hard to use primitives.