I wrote a domain-specific language for writing dirty limericks. It looks a lot like English, but you have to prefix rhyming words with colons. Otherwise, it's a completely new language, so please read my weblog and buy my book and come to my conference talk about how awesome I am for doing what everyone does every day with English: use it as intended.
:once :was :a :programmer :of :Ruby...
Here's more joy on my least favorite subject Ruby programmers can talk about these days:
I meant to suggest in my previous post that the flaw was in me for no longer thinking in Perl when using Perl, though at the same time if Perl were to better support DSLs (domain specific languages) then I would have gotten a Get-Out-of-Jail-Free Card despite my mis-think. I hope that others reading this benefit from the clarification as well.
Cosine Jeremiah, Knowing Ruby and Perl
Cosine, if you post yet another followup, please explain precisely what in the world you possibly mean by "better support DSLs" and perhaps even "DSL" in general.
Why do I ask this?
Cosine uses the example of Ruby's OO primitives and pervasive use of blocks to change the behavior of a Hash instance... and claims somehow that this makes a building block of a domain-specific language.
This baffles me.
When you find yourself starting to think "HAI I JUST WRITEDS A DSLS!!!", stop. You are not a Big Man who has performed the Manly Deed Akin to Dragon-Slaying and Princess Rescuing by defining your own language which just magically happens to have exactly the same syntax as Ruby and the same semantics of Ruby. YOU JUST CHOSE IDENTIFIER NAMES THAT MADE SENSE FOR YOUR PROBLEM DOMAIN.
Now that is a reasonable and honorable and well-maintainable thing to do, and I congratulate all of the Ruby developers (and Perl developer and Java developers and PHP developers and C developers and Haskell developers and you get the picture that just about every language that allows you to choose meaningful identifiers supports choosing meaningful identifiers while keeping the syntax and semantics of the language unchanged) for that.
Now can we all stop this wankery over "My language lets me do made-up thing that doesn't actually have any defining characteristics that I can't figure out how to do in your language" and actually have a conversation about how to write maintainable programs and devise good APIs?