Hacker News new | ask | show | jobs
by stevage 1020 days ago
I don't necessarily think the DSLs are badly designed. But personally I find the overhead in learning and remembering a new language to be enormous. I instantly drop from extremely high productivity in my language of choice to fumbling around like a newbie. And often DSLs are used for smallish tasks that you work on, write the code, then leave for a long time. Then you come back to it and have no idea how that language worked, its pecularities, etc.

It had better have an extremely high payoff to justify that cost.

2 comments

Embedded DSLs have much lower learning overhead, since they are just embedded in the language you are already using. Eg in Haskell, they are still valid Haskell programs. So they eg inherit the control structures from the host language, and most of the tooling in your editor, like 'jump to definition' also still works.

See http://wiki.haskell.org/Embedded_domain_specific_language

Because the overheads are lower, the payoff doesn't have to be as high to make it worthwhile.

(However, there's still some overhead, otherwise you wouldn't really label them as embedded-DSLs.)

I wasn't really aware of the embedded DSL distinction.

But even then. I was never really able to get into Observable because although it looks like JavaScript, there are kind of hidden objects and methods available to you that I found weirdly hard to discover.

What's 'Observable'?
https://observablehq.com

Kind of like Jupyter notebooks for JavaScript? Kind of?

Interesting. Why did you bring it up?
The issue is that a good DSL shouldn't be a "language", it should be a tool, a textual UI that is designed by and for power users for a particular task. When you are doing something 500 times a day you want a hyper efficient tool to accomplish that. Learning curve is irrelevant, only efficiency and expressibility. A DSL is a great fit. If you are doing some task once a month you just want something simple you can wrap your head around quickly. The problem is that the former often forget that the latter exists and so recommend their workflow to everyone, forgetting they have different needs. But both sets of needs are valid.
Hi, unrelated but I just wanted to say hello.

Stumbled across your post about spin2win a while ago and I'm glad you found it useful! I still use it every day and wish I could fix the jankiness but oh well hahaha.