3 ms·
We're just pointing out different things. I'm pointing out the different semantics of single-quoted literals as the source of the confusion, with "empty char"
by inimino 7y ago
We're just pointing out different things.
I'm pointing out the different semantics of single-quoted literals as the source of the confusion, with "empty char" being directly mentioned in the post as something that exists in Python, which, as of course you know, it doesn't.
If the confusion was about how to add a nothing value to a type, why did it arise specifically in regards to Char, and not, say, Integer? The question "why are the char types different between Haskell and Python in this way" is best answered by pointing out that Python doesn't have a char type at all, and all of these things are strings.
Of course, you're entirely correct that you can use a sum type to handle nulls.
- crimsonalucard 7y ago>If the confusion was about how to add a nothing value to a type, why did it arise specifically in regards to Char, and not, say, Integer? I illustrated earlier because of the similarity between char and str, he believed that because of recursive functions on str has base case [], he believed that char needed one too.