News for hackers. Stuff that matters.
Re:Types versus sets in math and programming languages by kazinator on Monday July 26, 2021 @06:45PM (#27966415)
> keyword "ℕ" cannot be used as an identifier

It looks to me like the guy has an outbreak of reservedkeyworditis the language that he's trying to handwave around with some talking point about sets versus type.

But a syntax error of a reserved keyword being used in some phrase structure that calls for a a non-reserved identifier doesn't have anything to do with type semantics.

The phrase structure of the A ⊆ B syntax could allow B to be certain keywords, such as ℕ, which is treated as a set in that context in the appropriate way (via an implicit conversion or whatever).

We know what A ⊆ N means; what the programmer is asking. The requirement is not unclear. Moreover, it is doable. The question is do you do that, or not.

Re:Types versus sets in math and programming languages by jdmichal on Monday July 26, 2021 @08:46PM (#27967335)
That struck me too. My initial impression was to simply implement "Set s ⊆ Type t" as something like "∀i: sᵢ instanceof t"