News for hackers. Stuff that matters.
Re:Clear is better than clever [pdf] by brigandish on Monday May 06, 2019 @09:35PM (#19845644)
I've not heard of the supplier pattern, any chance you would direct me to a resource about it?
Re:Clear is better than clever [pdf] by fjsolwmv on Tuesday May 07, 2019 @08:31AM (#19848770)
A Supplier is when a function needs a value, and instead of providing a value as an argument, you pass in callable:

Foo(int x){return x+1} becomes Foo(Supplier x){return x() + 1}

Re:Clear is better than clever [pdf] by pojzon on Tuesday May 07, 2019 @08:59AM (#19848935)
Function that supplies value, can also encapsulate alot of data generation code. After that you can write a strategy to select which data generation algorithm (supplier) shpuld be used.

Thats my cause.

Re:Clear is better than clever [pdf] by brigandish on Wednesday May 08, 2019 @12:27AM (#19855867)
Thanks.
Re:Clear is better than clever [pdf] by pojzon on Tuesday May 07, 2019 @01:16AM (#19846805)
Im pretty sure you know what i meant, no need for nitpicking.

(Does not make me any less right)

Re:Clear is better than clever [pdf] by stevesimmons on Tuesday May 07, 2019 @02:36AM (#19847114)
Just maybe he genuinely doesn't know what you mean. I mainly use Python and have no idea what you are talking about.

(You might consider reflecting on your tone and message. It presupposes bad faith on the other party, is dismissive and condescending, and you are probably less right than you think you are.)

Re:Clear is better than clever [pdf] by brankoB on Tuesday May 07, 2019 @02:56AM (#19847187)
I, too, have no idea what a supplier pattern is. Don't think that's a very mainstream notion.
Re:Clear is better than clever [pdf] by oblio on Tuesday May 07, 2019 @04:28AM (#19847521)
I'm not OP, but I don't know what you mean... Googling it leads me to Supplier in Java 8, which is probably not what you meant?
Re:Clear is better than clever [pdf] by brigandish on Tuesday May 07, 2019 @07:23AM (#19848387)
I can't nitpick what I don't know about. I know the strategy pattern, not the supplier pattern.

It sounds interesting, that was all.