MHN

lexi-lambda

karma 383·joined February 8, 2015·profile on HN

Recent activity

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