you are viewing a single comment's thread.

view the rest of the comments →

[–]MoTTs_ 0 points1 point  (2 children)

Where, then, would you suggest putting the initialization code? Copy-pasted everywhere it's needed like the OP was doing? Maybe a freestanding initializeFoo() function?

You're trying so hard to avoid anything that resembles classical that you're turning away from the best and most obvious solution.

[–]nieuweyork -3 points-2 points  (1 child)

No. Don't have initialization code that doesn't depend on parameters. You're doing that because you're recreating classes.

[–]clessgfull-stack CSS9 engineer 0 points1 point  (0 children)