Learn to write DSL's the right way


by Ara T. Howard

I was working with a certain popular ruby testing library today to prepare a pull request and hit an issue with it i've hit many times: passing and/or failing tests due to the testing framework itself polluting the hell out of the global namespaces. Don't believe it? Check this out:



the results were produced using this script



some people have claimed that this will always be a side effect of having nice DSLs, but this is simply not true:



so, learn how to write DSLs the right way people. the right way is any way that doesn't dump methods all over ever object and namespace without an extremely good reason.



"it should read nice" is not a good reason.