Top all-time · #13332
koerbitz.me
Personal blog · koerbitz.me/postsprogramming
koerbitz.me is a personal blog at koerbitz.me about programming. Since 2016, 6 different Hacker News readers have linked it 6 times. No feed was found, so read it on the site itself.
Too few sampled comments (5) to say how often HN recommends it.?
Why HN links it
HN readers link koerbitz.me posts on functional programming in Haskell, including an efficient quicksort implementation and a type-class approach to the expression problem. Commenters cite them as examples rather than judging them.
Summarised by Claude from a sample of 5 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
Most-linked posts?
- /posts/Solving-the-Expression-Problem-in-Haskell-and-Java.html2 people · 2 mentions · first linked 2016-05-15
- /posts/Solving-the-Expression-Problem-in-Haskell-and-Java.html2 people · 2 mentions · first linked 2019-05-20
What Hacker News says?
Here's a direct translation of a C++ implementation into Haskell with no optimization: https://koerbitz.me/posts/Efficient-Quicksort-in-Haskell.htm... Personally I think the Haskell code is a bit nicer. Mutation is inherently unsafe and you need to be more careful when performing such computations. Haskell code makes this painful to read by planting red-flag words like, "unsafe" around. In C++ mutation is the norm a…
Comment linking /posts/Efficient-Quicksort-in-Haskell.html
on “OCaml Programming: Correct and Efficient and Beautiful”Submitted Don't Beat Yourself Up as a story · 2 points
HN discussionI too disdainful SOLID. I appreciate this finally has been pointed out. Principles are in fact moral high grounds, without telling you what to do. For example, you need to resolve the expression problem[0] in Java, with Open-Closed principle compliant. Then the answer could be Java code like in this article[1] (the technique is Object Algebra). However the moral for me is, if I'm using Haskell or Ruby, when expressi…
Comment linking /posts/Solving-the-Expression-Problem-in-Haskell-and-Java.html
on “Solid Principles: A Software Developer’s Framework to Robust, Maintainable Code”I was planning on mentioning it as soon as I saw this post as well. I think most people who try using a functional programming language that encourages you to use sum types (at least when you're beginning) run into this in some way, but most people probably aren't aware that it has an actual name. Here's a post on solving it using type classes in Haskell, if people are curious! http://koerbitz.me/posts/Solving-the-E…
Comment linking /posts/Solving-the-Expression-Problem-in-Haskell-and-Java.html
on “What are potential disadvantages of functional programming?”I don't understand what's unclear, lifting values to the type-level and pattern matching on those values to type classes is a standard construction [1]. I only claimed that operations on Maybe can be lifted to type classes, you claimed that all uses of type classes can be monomorphized (barring "fancy types", of which Maybe is presumably not one). Since all pattern matching functions on simple sums like Maybe can be…
Comment linking /posts/Solving-the-Expression-Problem-in-Haskell-and-Java.html
on “The Expression Problem and its solutions”> The solution there is to add a method to the interface, and all your classes implement that. What if you don't know all methods that you will need in advance? That is the problem and this problem is solved by sealed classes. However, by doing so they introduce a new problem: what if you need more extended classes and you don't know all of them in advance? Which raises the question: is there a way to achieve both?…
Comment linking /posts/Solving-the-Expression-Problem-in-Haskell-and-Java.html
on “Java 21 makes me like Java again”