News for hackers. Stuff that matters.
Re:Why most of us won't be inventing little languages by PartiallyTyped on Monday April 17, 2023 @07:39AM (#35599302)
I share the sentiment; in the end, all abstractions are just that, little languages, perhaps even dialects within a broader language that defines what constructs you may use while remaining "correct".

I am working on a project at work that may involve some kind of language, and the language essentially came up because we need a way to define an arbitrarily large abstraction, effectively behaving as an intermediate layer between multiple different front-ends and a backend.

Re:Why most of us won't be inventing little languages by worldsayshi on Monday April 17, 2023 @07:47AM (#35599364)
I agree. In a way, all applications have a sort of implicit Domain Specific language in them. You have a bunch of things (nouns or types) and you can tell the application to work with those things in certain ways (language).

When I learned Haskell at University there was a lot of emphasis on EDSL (embedded domain specific languages), where haskell allows you to define grammars inside haskell. There are many examples of EDSL:s in other langauges but Haskell takes things a bit further. I think there could be a good point in allowing such approaches in more languages. I heard that Rust has ADT:s, which is a good building block for EDSL:s.

It might make things a lot clearer, or it might make things over engineered. I'm a bit on the fence about it. It probably makes things more manageable in the long run.

Re:Why most of us won't be inventing little languages by worldsayshi on Monday April 17, 2023 @09:58AM (#35600782)
Late edit: (*language or business logic)

The point of Building an EDSL could be to isolate the business logic from everything else. This should be a big benefit since for most cases it should be possible to make everything else from off the shelf commodities.