Top
Best
New

Posted by teleforce 1/7/2026

“Stop Designing Languages. Write Libraries Instead” (2016)(lbstanza.org)
279 points | 278 commentspage 3
eklavya 1/7/2026|
I don't know ruby or rails so probably wrong on this but why does the author say no framework for Java web. How different is Spring from that?

They talk about the programmer which doesn't know neither cares about the language stuff. So what is Spring lacking from that perspective?

DonHopkins 1/7/2026|
"Java is a DSL for taking large XML files and converting them to stack traces"

"XML is like violence. If it doesn't solve your problem, you're not using enough of it."

moffkalast 1/7/2026||
XML is like a flyer saying "do violence" maybe, it doesn't do anything by itself.
DonHopkins 1/7/2026||
[flagged]
fithisux 1/8/2026||
Julia got it right with its macro system. You can write embedded DSLs easily.
wolvesechoes 1/8/2026|
But they are still worse experience that dedicated, separate languages. Compare ModelingToolkit.jl with Modelica (ok, there are some differences in capacilities, but just compare how better is to express models in Modelica).
fithisux 1/9/2026||
DSL is always better until you need to grow an ecosystem around it. If you can, go down the DSL path, otherwise use embedded DSL. If you can, go down the embedded DSL path otherwise use a library.
igt0 1/7/2026||
Logic systems are a good place where the library first approach tends to work well: you keep a small, boring core (the inference engine), and let people extend it with predicates, rules/operators, and domain packages.

I’ve been experimenting with a small defeasible-logic core (argumentation semantics + priorities + conflict detection) that stays stable, while most of the real meaning lives in extension points. https://github.com/canto-lang/canto-lang

defactor 1/7/2026||
Java has Grails web framework. We have designed apps with 75% less resources and time compared to Spring at a big enterprise. But most devs wanted springboot.
newsoftheday 1/7/2026|
Grails requires Groovy, though you can integrate Java classes into a grails app.

Now that we can develop script style with Java 21, I'd like to see something like Grails that worked with Java only...that would be a fun way to develop web apps. I liked Grails, just not Groovy.

NoGravitas 1/7/2026||
Of course, in Lisp, you can implement language features as libraries, which kind of undercuts the point of this article.
ninalanyon 1/7/2026||
I'd say that the best thing ever would be an easy way to call a library written in xxx from a program written in yyyy.

There are lots of libraries already. Instead of rewriting them in every language why make them available to every language.

Yes, I know it would be difficult and in some cases impossible.

kazinator 1/7/2026||
> In summary, the purpose of a general-purpose programming language is to enable the creation of powerful and easy-to-use libraries.

Close! The purpose of a general-purpose programming language is to enable the creation of powerful and easy-to-use languages, but often just libraries.

dominicrose 1/7/2026|
Rails wouldn't exist without Ruby, Ruby wouldn't exist without C, Rails can't be rewritten in C, Rails isn't a library.

But aren't Rails, Laravel and Django a bit similar? At least for the people not directly involved in coding.

9rx 1/7/2026||
> Rails can't be rewritten in C

It could if you added message passing to C.

Which we have, and DHH admits that Rails took directly from that. Rails is (loosely) a rewrite of what was originally written in C [with extensions].

kristianp 1/8/2026||
> Rails is (loosely) a rewrite of what was originally written in C [with extensions].

Are you talking about WebObjects, which was written in Objective-C? (1) If so your comment is somewhat tangential to the truth.

(1 2104) https://news.ycombinator.com/item?id=8765009

More comments...