2012/10/22 Igor Stasenko <siguctua@gmail.com>:
On 22 October 2012 01:20, Nicolas Cellier <nicolas.cellier.aka.nice@gmail.com> wrote:
5 parameters???? Igor, you're a dictator ;) Those theories are nice, but unhelpfull when applied to FFI Pragmatically there's not any chance I rewrite LAPACK+BLAS for the sake of purity.
And your workaround (creating a class) is very poor, because maybe classes themselves should not have more than 5 instance variables ;)
Hehe. This is same thing like increasing number of literals for methods (and max distances between jumps). It just makes sense where you deal with external chaotic world. My ideology is simple: prevent that chaos from entering our little peaceful bay.
That's not exactly the philosophy behind FFI. FFI is here to let the user manage the external chaotic world. OK, external peels of the onion should have 5 parameters or less. Near the sprout, you can't raise such barriers, or there is no onion at all. Otherwise, the alternative would be to write all interfacing code in C (Slang would not be an option with 5 parameters) and create new primitives/plugins. The exact opposite of FFI. Or even worse in terms of costs/benefits, rewrite LAPACK+BLAS.
Because first, you introduce it because you need it to deal with external world (only for 1% of cases, and in 0% of cases for good written smalltalk code). But that's only at beginning. Once people discover that they have no limits, i bet they will start abusing it in most horrible manner you ever seen.
With such arguments you will soon want to protect us against some evil super powers like become: thisContext etc... ;) Don't castrate us and let us manage the risk of having 15+ parameters. Nicolas
Copy-paste is worst enemy of programmer. But usually not to one who using it, but one who needs to maintain the code after :)
Nicolas
-- Best regards, Igor Stasenko.