News for hackers. Stuff that matters.
Re:Software Architecture Is Overrated, Clear and Simple Desi... by darkarmani on Wednesday September 18, 2019 @02:02PM (#21008137)
> 3. Functions should have extensibility, put the required parameters as parameters and always include an “options” at the end. Each function can have defaults that you can extend, which means you need a deep-extend method:

No! Absolutely not! There is a time and a place for this, but it's nearly impossible to reason about the interface if any data can be passed in.

Re:Software Architecture Is Overrated, Clear and Simple Desi... by EGreg on Wednesday September 18, 2019 @03:34PM (#21009111)
I think you misunderstand. It’s not that “any” data can be passed in. The options object is documented in every version. It’s just a place that lets future versions add named parameterd
Re:Software Architecture Is Overrated, Clear and Simple Desi... by Madeindjs on Thursday September 19, 2019 @05:13PM (#21020822)
IMO If a method take many parameters there is a chance that this methods have too many responsibility and can be cut into two methods.