3 ms·
Classic: saving two lines of code, but completely breaking maintainability.
by f6v 3y ago
Classic: saving two lines of code, but completely breaking maintainability.
- tremon 3y agoExhibit #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/7b50e9dc37abc57fd365c16cb131cc33d8389ec0/lib/rake/task_manager.rb#L86-L145 https://github.com/ruby/rake/blob/7b50e9dc37abc57fd365c16cb1...
- elcapitan 3y agoI 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.