top | item 46228930

(no title)

davidkunz | 2 months ago

> It's in Java, but the lessons can be applied in every language.

I can only discourage anyone from applying Java patterns all over the place. One example in JavaScript: There was a functionality that required some parameters with default values. The plain solution would have been:

    function doStuff({ x = 9, y = 10 } = {}) {  ... }

Instead, they created a class with private properties and used the builder pattern to set them. Totally unnecessary.

discuss

order

No comments yet.