Pimp My Programming Language

It's hard out here for a programmer! Should programmers be allowed to add personalized bling to their languages of choice? Programming language experts debate to what degree developers should be able to tweak standardized languages.

Should high-end programmers be allowed to modify or add extensions to the programming languages they use?

That issue was among the points up for debate by a panel of programming language experts at the Microsoft PDC (Professional Developers Conference) in October. The issue was whether programmers should be allowed to extend a language to get around constraints or to do things they typically might not be able to do with the language in its standard form.

"You should be able to extend the syntax [of a language] as a programmer," said Jeremy Siek, an assistant professor at the University of Colorado.

Adding syntax or tweaking the syntax of a language could be somewhat akin to the idea of DSLs (domain-specific languages), in that a programmer could customize a language for specific tasks. There has always been tension between general-purpose language design and specific application requirements-usually developers have to compromise or work around language features. Adding syntax may be like adding macros in Excel, allowing a way to use language to represent common routines or to group multiple steps.

Erik Meijer, a Microsoft software architect and language expert who moderated the panel, asked, "But isn't it dangerous to have amateurs 'pimping' the language?"

Meijer was referring to the slang for glamorizing an object, as in the MTV show "Pimp My Ride," on which the goal is to find a car in poor condition and restore it, adding glitz and ostentation to the vehicle. Thus the "pimp" reference. In this case, Meijer wondered whether developers should be allowed to add "bling" to their programming language of choice.

Siek responded to Meijer by saying his question represented "fear, uncertainty and doubt. As humans we're coming up with new mutations and languages all the time ... and it's wrong to limit that." So programming languages should allow adding syntax extensions, Siek said.

Douglas Crockford, a senior JavaScript architect at Yahoo, said he didn't think it was a good idea, however. And Gilad Bracha, the creator of the Newspeak programming language and a distinguished engineer at Cadence Design Systems, said, "What will come out of inexperienced people making syntax extensions is that you probably won't be happy with the results."

Wolfram Schulte, a senior researcher at Microsoft, said, "One of the funny things is that we struggle with DSLs because of our inability to do parsing very well." However, "we could allow extensions to a limited degree," he said.

Bracha added that "having a less noisy syntax makes it easier to make a language that is like a DSL."