comp.lang.ruby likes to discuss Perl now and then, just as Perl newsgroups and lists like to discuss Ruby. I found one discussion particularly amusing, specifically maintaining code written in real DSLs in Perl 6 may be difficult.
Isn't Ruby the language with the community that walks very funny every time someone creates an API that uses symbols?
You'd almost think that speaking the language of your customer were a bad thing... unless you slap a colon on the front of all your nouns, that is, and immediately follow them with fat arrows.
Maybe all DSLs are equal, but some DSLs--the ones that look exactly like Ruby code--are more equal than others.
Apples and oranges (Score:1)
An internal DSL of the Ruby kind, and an internal DSL of the Lisp/Perl 6/Pop-11 kind are potentially very different beasts. And hell yes - there are some folk who do turn them into an evil maintenance nightmare. Language writing is a skill and it takes time for folk to learn it.
There are some folk [perlmonks.org] in the Perl community who think it'll be a maintenance nightmare too.
I'm not one of them -but being to redefine the syntax of a language is a powerful tool. It'll take time for folk to figure out the best way
Re: (Score:1)
I'm not one of them -but being to redefine the syntax of a language is a powerful tool.
Re: (Score:1)
D. Richard Hipp occasionally raves about how Tcl’s provisions for the creation of new syntax allow his Tcl SQLite bindings to provide control structures and constructs that completely shield the programmer from the details of the database API.
Nightmare Scenario (Score:2)
Re: (Score:1)
The problem here is not the language allowing a dangerously semi-competent to implement a custom grammar DSL. It is the fact that the programmer is dangerously semi-competent in the first place, which is why he chose to implement a custom grammar DSL despite it being an inappropriate choice under the tasks and concerns at hand.
Making powerful stuff harder for competent programmer doesn’t give you any insurance against the idiocy of the dangerous ones. Perl 6 (or Perl 5, or Ruby, or Python) seem like
Re: (Score:1)
I've more often seen:
It seems that these two scenarios have a lot in common, namely the barely-competent monkey. Perhaps hiring barely-compe
Re: (Score:2)
It's the very smart but undisciplined programmers that will be the issue, and there's plenty of those.
Re: (Score:1)
Same difference.
You’re seriously saying that very smart but undisciplined programmers won’t find a way to cause damage if you just take the complex toys away from them?
Re: (Score:2)
I could not, however, fix a Ruby backed DSL that's broken and based on a custom grammar, because I wouldn't know the grammar. It's possible I could *learn* the grammar, true, but not everyone can. Besides, now you're talking about more time, with less return on the time I invest.
As for "complex toys", language designers have to make their own decisions as to
Re: (Score:1)
You know Ruby's syntax maybe, but who says you know the domain of the business problem the code attempts to solve?
I maintain that that is much more important than syntax--and if you have undisciplined, barely-competent monkeys who cannot or will not write maintainable code, then your biggest risk is not that they might use powerful language features to do bad things that are hard to unravel.
Your biggest risk is
Re: (Score:1)
Meanwhile, everyone’s using
evaland “monkeypatching” like it’s going out of style next year. Recently I saw someone say thatmissing_methodshould be avoided because it may break when someone monkeypatches your class. These people certainly have their priorities straight, oh yeah.Somehow I don’t see anyone advocating closed cla
Re: (Score:1)
Meanwhile, everyone’s using
evaland “monkeypatching” like it’s going out of style next year. Recently I saw someone say thatmissing_methodshould be avoided because it may break when someone monkeypatches your class. These people certainly have their priorities straight, oh yeah.Somehow I don’t see anyone advocating closed cla
Re: (Score:1)
Discipline is part of competence. If you have undisciplined monkeys as co-workers, your biggest problem is not your choice of programming language. Your biggest problem is that you work with undisciplined monkeys.
Maybe they're less dangerous if you only let them use antelope bones and dull rocks than if they had power sanders and nail guns, but you're not going to get good work out of undisciplined monkeys no matter how powerful or useless the tools are because they're undisciplined monkeys.