News for hackers. Stuff that matters.
Re:Grain: A strongly-typed functional programming language f... by valenterry on Sunday April 25, 2021 @10:22AM (#26932905)
Sum-types are missing in your list ("either A or B").
Re:Grain: A strongly-typed functional programming language f... by Smaug123 on Sunday April 25, 2021 @01:01PM (#26934295)
Though I will continue to claim that quotient types should belong in the list but aren't - even in Cubical Agda that problem's not really solved! If you don't have an easily-computed canonical form for your equivalence classes, you're doomed in almost any language.
Re:Grain: A strongly-typed functional programming language f... by valenterry on Tuesday April 27, 2021 @08:43PM (#26964007)
Thank you for the term "quotient types", that's the first time I'm hearing that!!!

I agree that this would be an amazing thing to have, but I've never seen those anywhere in practice (not even in Idris). My gut-feeling tells me that it might not work in combination with composability in the sense that there might never be a proper global "equal" that everyone can agree one.

I'm curious - besides the ones mentioned, are there any other fundamental type concepts that you would build into your own programming language? :)

Re:Grain: A strongly-typed functional programming language f... by Smaug123 on Wednesday April 28, 2021 @07:07AM (#26967996)
Sadly I don't have "my own programming language", and even if I did, I think this is an unsolved problem in language design :P Interesting question, though; I'll think about it.