@davetron5000 We're assuming in the first version that the "some logic" is stateless or idempotent?

I find that more developers are likely to understand the stateful version, and while I may decry the lack of genuine OO design skills, that's still a factor.

I've basically written the stateful version a lot but I do like the stateless version where it's feasible.

2
Share
Share on Mastodon
Share on Twitter
Share on Facebook
Share on Linkedin
Noel Rappin

@davetron5000 In most of these cases that I write, the object isn't reused, so calling it multiple times is rarely a problem in practice.

0
6mo
Dave Copeland :ruby:

@noelrap yeah the core logic’s only “state” is to leave behind a structured explanation of what it did when called.

1
6mo
Replies