On Thu, Nov 04, 2004 at 06:05:02PM +0100, Martin Stjernholm, Roxen IS @ Pike developers forum wrote:
Now, the added complexity of a flag isn't very much, so the speed gain doesn't have to be very much either.
It is not about speed gain (in case of SQLite) - it is about conversion which takes place implicitly. One must know that passed strings must not be UTF8 strings, so conversion won't hurt them. This is neither checked nor documented, and even if documented, it forces user to do something to fullfill this requirement.
measurable, I think. Otherwise people will see the flag, think that it'll have a worthwhile effect and maybe start troubling themselves
I am not that kind of person. I follow the principle "If you don't know what it is for, you don't need it" :) And I am quite sure that I am not alone. Just try to extend this analogy to C library (for instance): "...people will see the function, think that it'll have wortwhile effect and may be start troubling themselves". See? There are thousands of functions available in different libraries, but mere existence doesn't mean that they should be used, nor it troubles anyone.
Same for Pike - I see the module (say) DVB, but it doesn't make me trouble myself in questions like "Perhaps, I can make use of it?".
All this is not about "what is Pike for and what it is not" - it is generic (so far) interpreted language, so it might (and is) used for anything and everything. In turn, it means that more control over what is going on and how is better than less control.
Live example - Stdio.FILE()->set_charset() - it is there, but I never troubled myself asking "How can I use it?" - I just ignored it.
So why mere existence of set_charset() of set_encoding() in SQLite will trouble anyone? Why do you try to foreacts what other people will think or do, instead of giving them a freedom of choice? :)
Or tell me that "Pike is only for this and this, use it like this and never like that" - I can live with it. But never, ever judge what Pike users expect or not - eventually you will be wrong in your judgment.
I just want to understand _why_ SQLite uses implicit conversions when no other DB module does this, that ALL. If core team or module author against my proposal to add this flag - this is OK, just _tell_ me that in _clear text_, instead of trying to convience me that I am wrong, or at least _prove_ that I am wrong. This will be fine - I'll make my _own_ module and use it silently (i.e. no discussions or publishing) in my applications, because I know better what is good (and right) for _my_ applications (I am not talking about anyone else here, just me).
Regards, /Al