• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Functional Design and Architecture - Domain-Specific Languages

 
Greenhorn
Posts: 26
Java ME Quarkus Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Alex,

Embedded domain-specific languages are everywhere in functional programming, we can say FP and eDSLs/DSLs are natural partners. We use eDSL/DSL to reduce complexity of the system and to keep things decoupled from each other.

When we decide to be using eDSL/DSL so the client code will only work with the DSL (its dependency on native calls will be eliminated), we then have an option to use a native translator for the eDSLs/DSLs that converts high-level commands to native functions or we can test our scenario separately by inventing some testing interpreter. What is your personal preference and why?

Thanks
 
Author
Posts: 27
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stepankha Yuliannia wrote:Hi Alex,

Embedded domain-specific languages are everywhere in functional programming, we can say FP and eDSLs/DSLs are natural partners. We use eDSL/DSL to reduce complexity of the system and to keep things decoupled from each other.

When we decide to be using eDSL/DSL so the client code will only work with the DSL (its dependency on native calls will be eliminated), we then have an option to use a native translator for the eDSLs/DSLs that converts high-level commands to native functions or we can test our scenario separately by inventing some testing interpreter. What is your personal preference and why?

Thanks



Hi Stepankha,

This is a great question! And actually, you've just repeated what I'm saying in my book. There is a chapter I finished recently - Chapter 5, Embedded Domain-Specific Languages. It has all the answers to your questions. Here, I'd confirm that eDSLs is a very natural and essential thing for FP, and I encourage to use them all the time. Not only for small things, but as an architectural solution: you can have eDSLs as interfaces to your subsystems, and then interpret them to make it work in the real environment. This is the main idea of my book and methodology I call Functional Declarative Design. I use it quite a lot in my work and in my hobby projects. I'm a very big fan of interpretable languages, to be added.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic