Hacker News new | ask | show | jobs
by f6v 1059 days ago
Classic: saving two lines of code, but completely breaking maintainability.
1 comments

Exhibit #1: rake's DSL syntax. It allows "neat" syntax abominations like

  rule :name, [:param] => [:dep1, 'dep2'] do |t|
where every argument except the name can either be missing, single (value) or multiple (array). Sure, it has the "advantage" that it's syntactically valid Ruby code, but it then requires some 70 lines of awful code to actually parse that data into a usable construct: https://github.com/ruby/rake/blob/7b50e9dc37abc57fd365c16cb1...
I always have to look up the variations of that parameter passing when writing rake tasks, not sure that is such a good sign that it's a great design in the first place.