Re:Types as Interfaces
by kelseyfrog on Tuesday July 23, 2024 @02:46PM
(#41049433)
> PrimeNumber is definitely possible in pretty much any dependent type language.
That's awesome! Thank you. I didn't know type systems were capable of expressing that level of sophistication.
Would HaltingProgram and NonHaltingProgram be expressible? I hope it's clear what I'm trying to convey, but the technical wording escapes me today.
see the 'total' keyword in Idris
HaltingProgram and MaybeHalting is expressible(or vice versa), if you want to cover all programs in one of two types. If you want specifically HaltingProgram and NotHaltingProgram then you need a third category of MayOrMayNotHaltingProgram.
TotalProgram: possible in some, not in others, I think.