I would go with the functional approach like in you noticed in PHP (not always) or KOL (Always) (Yes the KOL Object Pascal framework works like that too, so it's not stealing from PHP )
Well, if I'm honest, I think that jQuery was, historically, one of the first ones to get that into the wild
But there are many that don't agree with me.
Yeah, ya know, hatters will be hatters
OTOH that approach makes filtering easy and readable. Functions returning self can be very powerful and have my preference over a procedural approach.
Things like LINQ (KOL predates LINQ by a good many years) are based on the same principle and I like that because of its readability. The order in which a filter is applied is immediately obvious.
Yeah, I was expecting someone to advocate this. jQuery, PHP and LINQ are all into that. And for all the reasons you're mentioning.
I'm still a little more inclined towards option 5. Probably because I like the PHP way of creating a
$options=array(...) and then just calling the function with that...
I'll wait for some more input and then probably toss a coin, LOL!!
What I like is that you obviously have an interest in your architecture and given it already a lot of thought. I am sure you will find the right one for the job at hand.
Unfortunately, for the crawling pace I'm at now, thinking has been probably most of I've been doing.
I like to get it right. That's obviously not good, since we all know that perfection is the enemy of release. And also, I'm too old and have WAY too many standards floating in my head. And not only from Object Pascal.
All the new stuff that is coming out in terms of TDD and best practices in the fields of OOP, Functional programming and all these new architectures/frameworks etc...
All this floats around in my head and just gets in the way... Hence trying to ask for help instead of completely over-thinking it!
And for your input, MANY, many thanks!!
Cheers,
Gus