News for hackers. Stuff that matters.
Re:Almost Always Unsigned by mamcx on Sunday January 02, 2022 @02:03PM (#29772312)
Totally!

This is one of the best features of the pascal family:

http://www.delphibasics.co.uk/Article.asp?Name=Sets

(look in "SubRanges")

Re:Almost Always Unsigned by jstimpfle on Sunday January 02, 2022 @03:01PM (#29773099)
Almost useless in my opinion (because not a lot of practical invariants can be expressed with simple ranges) and will only create confusion when using non-0, non-1 based indexing and also create confusion about the representation/the space required for representation. The examples shown there are similar to the Animal-Cat-Dog examples that are popular to "prove" that classes and inheritance are useful.

That, plus the type incompatibility that arises from mixing such types with other integer types.

Re:Almost Always Unsigned by mamcx on Sunday January 02, 2022 @03:24PM (#29773402)
Do you have uses Pascal?

The ones that used it like it...

Re:Almost Always Unsigned by jstimpfle on Sunday January 02, 2022 @03:29PM (#29773473)
I have worked on an enterprise application written in Delphi full-time for 6 months.