• Hudell@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    17
    ·
    2 days ago

    I have created a handful of DSLs over the years and I think most of them were bad ideas. Ironically the most complex one is the one that I think was actually right. It had support for a lot of stuff like loops, functions, custom variables and even some weird shit like async execution of child commands.

    I think what made it work in that case was mostly that the purpose of the DSL was completely different from the others. The system wasn’t designed with a DSL in mind. The DSL was just a simpler way to provide input for something that was already there.

    • owsei@programming.dev
      link
      fedilink
      arrow-up
      2
      ·
      24 hours ago

      Exactly! Making a DSL and using it like a programming language introduces necessities that will not be considered as throughly if they where added to a “real” language.

      I once wanted a DSL for a calendar program I was making (so the user could define complex events and stuff). So I made a simple programming language that could be embedded in the program, kinda like how lua is commonly used.