Whole Lotta Frameworks, Notta Lotta DSLs

Asher Bond
3 min readSep 10, 2024

--

Give me the language and give the framework to someone else.

What’s the difference between a DSL and a wolf in sheep’s clothing:

True DSLs are those that define their own syntax and grammar specifically for tasks in a domain like probabilistic programming (e.g., Stan).

DSL-like frameworks provide abstractions and APIs within general-purpose languages, mimicking the experience of a DSL without being fully expressive languages. It’s this lack of expressive freedom which often becomes problematic sooner or later.

Frameworks that slow you down should be avoided entirely

Look. I don’t need a framework. I know what I’m doing. And even when I don’t, I have help which specializes in shelling out idiomatic language. Shelling out idiomatic code comes naturally to natural language processors (NLP) and the process is improved further by natural language understanders (NLU). I have 99 frameworks and most of them are nothing more than a hyperstructure to circumnavigate. If you ask me to write code in a specific framework, I’ll write it first however I can get the job done and we can talk about refactoring when there’s a good reason. If you want to see how smart I am, I’m smart enough to stay out of trouble and not try to use these outdated frameworks. Someone else can get certified in those outdated frameworks, but I think they’re crazy, having submitted themselves to the chaos of clinging to crumbling infrastructure. When I build an application, the only framework I care about is the one that gets me moving faster. For me, Puppeteer still does this somehow. I think it’s because they figured out how to focus on behavior driven development and making it easy makes everything else faster. Faster, Cheaper, Better is generally how developers think, so until they get into large groups (usually 50+) that start to huddle around their infrastructure and some branded and marketed frameworks where the marketing material combined with a little bit of sunk cost fallacy says it’s more maintainable. Frameworks are always faster initially when they first come out, but they lie about maintainability. They say, use this framework and your application will be more maintainable. Then they get comfortable and fail to maintain the framework. I was in the BART tunnel under downtown SF yesterday around Montgomery Street and saw some type of heavy duty content manager / web framework posted up all over every possible place you could advertise. I think I’m good with HTML5/CSS/JS as a framework though. That’s the better way to build web sites for a magnitude lower cost and a magnitude higher efficiency at scale. Yesterday’s pre-LLM, pre code-generation-copilot frameworks are more of a hinderance than a shortcut. I’ll take all the shortcuts I can get and someone else can have all the billboards they want to rent.

The topic I want to get into is really Domain Specific Languages. Most of these so-called domain specific languages are frameworks (wolves) in sheep’s clothing. With all of the domain specific models coming out these days and with every frontier model trainer talking about how they’re transfer-training domain specific models for enterprise, startups, and other clients… I can’t help but wonder: What will be the next big domain specific language thing? I think it will be Cognitive DSL since I wrote it. Sure I have my biases, but it’s the only language other than Stan (which is hella traditional and more bayesian than deep) which is truly not just a framework but an actual domain specific language.

YAML :: YADSL

I wrote a previous DSL 15 years ago and I remember going to developer hangouts and as I was shmoozing up developers they kept saying, “Hey Mr. DSL Guy… You do know that we already have YAML right?” Which is a somewhat valid point of initial practicality. These days YAML is really the de-facto substitute for a domain specific language even if YAML Ain’t a Markup Language (and we’re glad it isn’t). But YAML YADSL… that is YAML Ain’t Domain Specific, Lads. At least not in it’s generic form. So you get software companies that always say they have a DSL when they have YAML with some domain specificity applied. Whether or not it’s a DSL depends whether or not it’s as expressive as a regular programming language within the context of that domain. In fact I would argue that a DSL should be more expressive than the underlying language when focusing on the domain.

--

--

No responses yet