Skip to content
Recent activity
-
I can say that I am not particularly concerned with compile-time range checking. I...
-
Yes, certainly. Constructive data modeling is useful for many things, but it’s not a...
-
Well, like I said, the subject is extremely broad, so it is difficult to give concrete...
-
You know what, you’re right—I misread your original comment. I was just going through...
-
Yes, that’s about right. But really do read the followup blog post...
-
Generic is quite specific to Haskell, so it is probably difficult to explain without a...
-
You come off as a crank. Perhaps you are one, perhaps you are not, I don’t know, but...
-
Haskell’s `newtype` keyword defines a genuinely fresh (nominal) type that is distinct...
-
> In Java, you'd implement this by making a class with a private constructor, no...
-
There is really no difference between doing this and returning a `Maybe`, which is the...
-
> As a result I have not found this article a good one to share with junior developers...
-
> If you are trying to mix NonEmpty and AllEven and AllGreaterThan100 for the List...
-
Certainly I don’t think `parseNonEmpty` would be especially useful in a real program,...
-
You are sort of mistaken. I wrote a followup blog post that discusses what you are...
-
There is a fairly obvious difference between a dynamic enforcement mechanism like...
-
> If you can't create a value of type PrimeNumber that doesn't contain a prime number,...
-
I discussed how/why the point of this article is very much not to “parse everything”...
-
Amusingly, the tweet that inspired this blog post—which is linked in the second...
-
> While an element of type bool is an instance of type a, an element of type bool ->...
-
I don’t think the complaints about evaluation order in this blog post really make...
-
All these explanations seem somewhat confused to me because they don’t pin down what...
-
This is sort of a perplexing perspective to me. It seems tantamount to saying “you...
-
In Haskell, a newtype can be a single-field record with a named field, so from a...
-
As was already mentioned in another reply, what you are describing are refinement...
-
Yes, on its own, a newtype is nothing more than a name. The safety comes from pairing...
-
> What's a better alternative though? I’m not really suggesting there needs to be an...
-
Read the article more carefully. I wrote in multiple places that the use of newtypes...
-
It actually does, though I didn’t mention it in the blog post. Here’s how you write...
-
What is “reasonable”? Suppose we take your argument to its logical conclusion—a type...
-
I (the author) did not imply that the definition of EvenList I gave would admit [1, 2,...