Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not enough engineering #29

Closed
alii opened this issue Nov 5, 2021 · 5 comments
Closed

Not enough engineering #29

alii opened this issue Nov 5, 2021 · 5 comments

Comments

@alii
Copy link

alii commented Nov 5, 2021

No description provided.

@mde
Copy link
Owner

mde commented Nov 6, 2021

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.

@mde mde closed this as completed Nov 6, 2021
@tj-commits
Copy link

What does engineering mean in the context of Node.js?

@mde
Copy link
Owner

mde commented Jul 6, 2024

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/

@tj-commits
Copy link

@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.

@tj-commits
Copy link

It would affect performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants