Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7548407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T09:41:28+00:00 2026-05-30T09:41:28+00:00

In a recent question about a DSL I tried to mix DSL expressions with

  • 0

In a recent question about a DSL I tried to mix DSL expressions with expressions of the embedding language which happens to be procedural (in that case Python). After some experimenting I am at the point of abandoning the continuation of strict procedural syntax in favour of a lispy style, i.e. instead of my original idea of

 @MY_DSL_FOO_FUNCTION(params,@ANOTHER_DSL_FUNCTION(...),expression_in_python,more_expressions_in_python)

I now tend towards

  {MY_DSL_FOO_FUNCTION params,{ANOTHER_DSL_FUNCTION ...},expression_in_python,more_expressions_in_python}

Any opinions (preferrably based on experience) on this syntax decision?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T09:41:29+00:00Added an answer on May 30, 2026 at 9:41 am

    If you modify that syntax a tiny bit more to use ()’a and ,’s properly, you don’t need a “DSL”.

    You’ve got plain-old-Python. Life is good.

    from my_standard_package import *
    
    (MY_DSL_FOO_FUNCTION, params, (ANOTHER_DSL_FUNCTION, ), expression_in_python, more_expressions_in_python)
    

    All you need to do is add ,’s. Since you seem to have two things — functions and expressions, perhaps you mean this.

    ( MY_DSL_FOO_FUNCTION(params), ANOTHER_DSL_FUNCTION(), expression_in_python, more_expressions_in_python )
    

    That would be perhaps more Pythonic.

    But maybe your goal is some kind of late binding where the tuple is evaluated later in some other context or something.

    from functools import partial
    ( partial(MY_DSL_FOO_FUNCTION, params), ANOTHER_DSL_FUNCTION, lambda: expression_in_python, lambda: more_expressions_in_python )
    

    In this way, the functions with parameters are use to build other functions that can be evaluated later. Yes. This does involve more syntax. However. It also avoids creating yet another language.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A recent question contains a problem that I many times used to think about
In reading this recent question about an unhandled XmlException, I tried to reproduce it
A recent question about string literals in .NET caught my eye. I know that
I recenty asked a question about parallel programming algorithms which was closed quite fast
Probably a trivial question, but in which order does Exception::getTrace return calls? Most recent
Inspired by the recent question about 2d grids in Haskell, I'm wondering if it
On a recent question about MVC attributes, someone asked whether using HttpPost and HttpDelete
In a recent question I asked about the fastest way to convert a large
I was surprised that the Latex code from a recent question didn't throw up
I am new to python and I have a question about a piece of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.