Personal blog covering programming paradigms, language, science, history, and a long investigation into shaken baby syndrome research.
HN links it for the shaken baby syndrome piece, called a great starting point, and for language posts; one commenter says the author handles criticism poorly.
> awkward currying
Personally, even though I haven't really thought it through deeply, I feel like Scala would be better if everything were curried.
> Subtyping also has many complex consequences
But also substantial benefits!
> There is limited type inference
I wish Scala would improve in this regard. Maybe paradoxically, inference works better with code tuned for subtyping and variance.
> tail call optimisation
This will be fundamentally solved by Project Loom. At least on the JVM (there's also Scala on JS and on LLVM).
> F# has units of measure
I dearly miss those. Type Providers even more so.
> OCaml has polymorphic variants
Could be nice in Scala. Or maybe not, can't tell now. And there's always the risk of too many features, which makes a language worse, not better.
> It was not designed as a functional programming language first and foremost
This is misleading at best. It was designed to show that the distinction between OOP and FP is arbitrary, not fundamental. In other words, Scala erases the distinction, it's fully OOP and fully FP. Scala has higher order functions, ADTs, pattern matching, a module system, like SML/OCaml. But it uses keywords `class` and calls it's instances "object" like Java. And it's interoperable with Java. But theoretically there's no fundamental distinction.
More languages are becoming more and more like Scala, btw.
https://www.lihaoyi.com/post/FromFirstPrinciplesWhyScala.html
And the concept of a programming language paradigm…
The idea of "programming paradigms" is not a useful way to talk about programming language design.
> The trouble with programming paradigms is that it is rather difficult to say what one is, or how we know we have a new one. Without precise definitions, nothing precise can be said, and no conclusions can be drawn, either retrospectively or prospectively, about language design.
>
> What, if anything, is a programming paradigm? [0]
Luckily, we've studied programming languages and their design rigorously for decades, and we already have a rich, common language for discussion the design space of programming languages: type theory.
It sounds intimidating: "theory" is often general abstract nonsense that's only useful in academic research, etc., etc. But that's not the case at all. "Type theory" is really just a really useful way to understand individual features of a programming language, and how they compose with one another.
[0]: http://www.cambridgeblog.org/2017/05/what-if-anything-is-a-programming-paradigm/
There's more to the admittedly fuzzy-edged concept of functional programming than function application.
I'd agree with you that the feature list is more important than a vaguer title. That's something Robet Harper talks about: http://www.cambridgeblog.org/2017/05/what-if-anything-is-a-programming-paradigm/
But the selection of features has limited value if the selection isn't coherent and the features don't compose. Within both FP and OOP there are languages whose design choices represent coherent choices with synergy... and ones that don't.
Go's feature set doesn't provide that coherence and synergy for functional abstractions. Frankly, it's an awkward obstacle in that direction. Beyond that, its feature set is deliberately designed to place arbitrary limits on abstraction.
The problem is that once you expose any surface area for censorship decisions, some of the loudest voices point to it and apply "inaction is violence" (an appropriate concept in some contexts, I should say.) Because the Euphemism Treadmill is a real thing [1], there's always grounds to pressure companies to ban or steer people away from newly incorrect language.
I can see many asking: Why steer writers away from slurs but not "biological male"? Is everyone at Google just... unaware of what's happening right now? I find it hard to believe that there's no one there who can explain what's wrong with this term or how badly we need to raise awareness about it.
[1] https://www.cambridgeblog.org/2020/08/ableist-language-and-the-euphemism-treadmill/
> There are a few reasons that people prefer the term nonwhite over POC in certain contexts, and I think most people using it are using it intentionally because of them. The main issue is that the latter term is homogenizing:
https://www.cambridgeblog.org/2020/08/ableist-language-and-the-euphemism-treadmill/
Colored people used to be acceptable, then deemed racist as well, in favor of PoC, then BIPoC because PoC wasn't inclusive enough and so on and so forth...
It's the Euphemism Treadmill.
If you want to understand more about how the science on Shaken Baby changed, this is a great place to start: https://news.ycombinator.com/item?id=37650402
That HN post links to https://www.cambridgeblog.org/2023/05/a-journey-into-the-shaken-baby-syndrome-abusive-head-trauma-controversy/ which explains in detail how the "triad" or symptoms that has been assumed to mean Shaken Baby actually can happen from a variety of other medical causes.