Subject Re: [Firebird-Architect] Re: External Engines (and Plugins)
Author Vlad Khorsun
Lester Caine :
> Vlad Khorsun wrote:
>> Alex Peshkov :
>>> On Tuesday 24 June 2008 21:11, sergey.mereutsa wrote:
>>>> Agree, if entrie server is written in C/C++, why you must use non-
>>>> native for C indexes? Personally, I prefer zero for first array
>>>> element.
>>> I also prefer 0. But this is _SQL_ server, and we should better follow SQL
>>> traditions here. In SQL all enumeration is done based 1.
>> This is not SQL-language interface. This is C++ interface. Any plugin\external
>> engine will implement its own user-friendly wrapper on the top of this interface
>> to use with target programming environment. And in this wrapper they may use any
>> number for low index bound.
>>
>> I don't know on which SQL traditions you reffers above. Am i SQL newby ? :) Why
>> should we ugly our own interface because of some suspicious traditions ??? I
>> guess our own traditions must be closer for us (remember XSQLDA ? ;)
>
> The main problem here is MIXING the base when writing code and writing SQL.

Agree.

> I STILL keep putting 'FROM 0' when it should be 'FROM 1'. The SQL standard is
> cumbersome, but it is at least consistent, and any interfacing that eventually
> targets it would be nice to have consistent with that as well ;)

This is different layers. At SQL layer we have to use 1-based indexes, agreed.
But why should we use it at much lower C++ layer ? Am i must change all our
internal C++ classes to use 1-based indexes ? Lets don't mix things, please.

Regards,
Vlad

PS It seems we waste our time discussing nothing