Closed alii closed 3 years ago
What does engineering mean in the context of Node.js?
I mean, it should at least implement three or four of these, minimum: https://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612/
@mde Okay, now that makes more sense. But I think such a crucial library should not be so big. Like, using Object Oriented Programming could make it look like this, which is too big.
class TrueValue {
constructor () {
this.value = true // or whatever we use for true value
}
}
class ReturnTrue() {
constructor(value) {
this.t = () => value
}
}
const trueValue = new TrueValue().value
const returnTrue = new ReturnTrue(trueValue).t
module.exports = returnTrue
Way too much code in my opinion.
It would affect performance.
I would be happy to have a look at a PR that properly implements sufficient engineering. It should probably use some sort of Factory, or IOC, at a bare minimum, to be enough.