Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)
От | Gavin Flower |
---|---|
Тема | Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL) |
Дата | |
Msg-id | 515C541D.1070605@archidevsys.co.nz обсуждение исходный текст |
Ответ на | Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL) (Pavel Stehule <pavel.stehule@gmail.com>) |
Ответы |
Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re:
Should array_length() Return NULL)
Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL) |
Список | pgsql-hackers |
On 04/04/13 04:58, Pavel Stehule wrote:
ALOGOL 60 was zero based by default, as I remember deliberately setting the lower bound to 1, I managed to avoid PASCAL and I only glanced at ADA.2013/4/3 Gavin Flower <GavinFlower@archidevsys.co.nz>On 04/04/13 03:02, Florian Pflug wrote:On Apr3, 2013, at 15:30 , Andrew Dunstan <andrew@dunslane.net> wrote:Zero as the default lower bound is consistent with most languages (especially the common ones like C, C++, Java, & Python), in fact I don't remember any language where that is not the case (ignoring SQL) - and I've written programs in about 20 languages.On 04/02/2013 02:46 PM, Florian Pflug wrote:Uh, yeah, we should make it 1 then, not 0, then. As long as the boundIf we're going to break compatibility, we should IMHO get rid ofThat would actually break a HUGE number of users, since the default lower
non-zero lower bounds all together. My guess is that the number of
affected users wouldn't be much higher than for the proposed patch,
and it'd allow lossless mapping to most language's native array types…
bound is 1. I have seen any number of pieces if code that rely on that.
is fixed, conversion to native C/Java/Ruby/Python/... arrays would still
be lossless.
best regards,
Florian Pflugpascal, ADA, and ALGOL like languagesRegardsPavel
Cheers,
Gavin
В списке pgsql-hackers по дате отправления: