DSLs in PowerShell

In an earlier post, I quoted John Lam saying that one reason Ruby is such a good language for implementing DSLs (domain specific languages) is that function calls do not require parentheses. This allows DSL authors to create functions that look like new keywords. I believe I heard Bruce Payette say in an interview that Ruby had some influence on the design of PowerShell. Maybe Ruby influenced the PowerShell team’s decision to not use parentheses around function arguments. (A bigger factor was convenience at the command line and shell language tradition.)

In what ways has Ruby influenced PowerShell? And if Ruby is good for implementing DSLs, how good would PowerShell be?

Update: See Keith Hill’s blog post on PowerShell function names and DSLs.

Tagged with:
Posted in PowerShell
2 comments on “DSLs in PowerShell
  1. Aaron says:

    Perl doesn’t require parentheses for functions. I imagine that’s where Ruby got the idea. And in that case it was deliberate, to improve readability or rather, readaloudability.

    Are there other older languages that also don’t?

  2. John says:

    VB had this strange syntax where sometimes you used parentheses and sometimes you not only didn’t have to but were not allowed to. At one point I understood it, but it’s been too long.

2 Pings/Trackbacks for "DSLs in PowerShell"
  1. [...] DSLs in PowerShell Scripting and the last mile problem [...]

  2. [...] DSLs in PowerShell Scripting and the last mile problem [...]