Hacker News new | past | comments | ask | show | jobs | submit login

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?





And checks on compile time are quite insightful, Ada tends to know beforehand if you're gonna run out of bounds.


Or, don't split between primitives vs objects.

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


The result of that will not be easy to use objects, but hard to use primitives.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: