O
osa1
osa1.net · Personal blog · on HN since 2012
osa1 is a programmer who writes about compilers, OCaml, parsing, and language design, including OOP, inlining, and polymorphic records.
What HN saysHN commenters link his posts in threads on OOP, OCaml, resumable exceptions, and record access, and discuss his arguments and related approaches.
15HN people shared it
6linked it in comments
13stories submitted
251story points
9 months agolast shared
2012people per year2026
Most-shared posts
- 1OOP is not that bad5 people · 149 points · first shared 2024 · 288 comments on HN
- 2My Thoughts on OCaml2 people · 3 points · first shared 2023 · discussion on HN
- 3Exploring parsing APIs: the cost of recursion2 people · 3 points · first shared 2024 · discussion on HN
- 4Fast Polymorphic Record Access2 people · 2 points · first shared 2023 · discussion on HN
- 5On sufficiently smart compilers1 people · 50 points · first shared 2015 · 16 comments on HN
- 6Lazy lists in Lua and eliminating tail-calls with continuations1 people · 38 points · first shared 2012 · 1 comments on HN
- 7Exploring parsing APIs: adding a lexer1 people · 2 points · first shared 2024 · discussion on HN
- 8When Is Inlining Useful?1 people · 2 points · first shared 2024 · discussion on HN
- 9Subtyping and Subsumption1 people · 1 points · first shared 2024 · discussion on HN
- 10Exploring parsing APIs: what to generate, and how1 people · 1 points · first shared 2024 · discussion on HN
- 11OmerSinanAgacanCV.pdf1 people · first shared 2016
- 122024 11 04 resumable exceptions1 people · first shared 2026
What HN people wrote when they linked it
enugu · 2024-11-26
This is a digression, but regarding OOP, my somewhat provocative view, is that it is not a natural thing, but in most languages, it is atleast 4 different concepts 1. Encapsulation/Namespace, 2. Polymorphism, 3. Extensibility(Inheritance is a special case) 4.Mutability.
These four concepts are forced/complected into a 'class' construct, but they need not be.
In particular, FP only varies on 4, but languages like ML,Clojure do 1,2,3 even better than OOP languages. Modules for encapsulation, Dispatch on first or even all arguments for polymorphism and first class modules, ML style, for extensibility.
Aside: There was a recent post (https://osa1.net/posts/2024-10-09-oop-good.html) (by someone who worked on GHC no less), favorably comparing how OOP does extensibility to Haskell typeclasses, which are not first class, but modules in ML languages can do what he wants and in a much more flexible way than inheritance!
There is also the dynamic aspect of orginal OOP - message passing instead of method invocation, but this is about dynamic vs static rather than OOP vs FP.
What OOP languages have managed to do which static FP hasn't done yet is the amazing live inspectable environments which lead to iterable development like we see in Smalltalk. The challenge is to do this in a more FP way while being modular.
hutao · 2026-01-24
I'd never heard of "resumable exceptions" before, so I searched them up [1][2]. Is this another name for the language feature called "effect handlers" in OCaml 5?
[1] https://osa1.net/posts/2024-11-04-resumable-exceptions.html
[2] https://softwareengineering.stackexchange.com/questions/80336/do-resum…
Joker_vD · 2024-10-23
For another approach without monomorphization see also my comment at [0] although it's only really meant for the immutable records.
[0] https://osa1.net/posts/2023-01-23-fast-polymorphic-record-access.html
williamcotton · 2024-10-21
Sure, anecdotal evidence. Here's another anecdote:
Original article: https://osa1.net/posts/2024-10-09-oop-good.html
LLM (ChatGPT o1-preview) results: https://chatgpt.com/share/67166301-00d8-8013-9cf5-e8a980aca775
LGTM!
I'd like to know which model is used in the article you've referenced as well as the prompt. I also suspect that 50 pages is pushing up to the limits of the context window and has an impact on the results.
---
As for the article itself... Use a language like F# or OCaml and you get a functional-first language that also supports OOP!
sidkshatriya · 2023-04-27
- A bit of a response to https://osa1.net/posts/2023-04-24-ocaml-thoughts.html
- See also https://news.ycombinator.com/item?id=35699697
osa1 · 2016-10-03
- Location: Indiana, USA
- Remote: Yes
- Willing to relocate: Yes
- Technologies: Haskell (4 years), compilers (3 years), verification
(mostly in Coq), systems programming (OS, networking), C, Rust.
- Resume/CV: http://osa1.net/OmerSinanAgacanCV.pdf
- Email: [email protected]