From: | Brendan Jurd <direvus(at)gmail(dot)com> |
---|---|
To: | Chris Travers <chris(dot)travers(at)gmail(dot)com> |
Cc: | Jeff Davis <pgsql(at)j-davis(dot)com>, pgsql-advocacy(at)postgresql(dot)org |
Subject: | Re: Should we drop the "object" from ORDBMS? |
Date: | 2012-04-26 07:16:42 |
Message-ID: | CADxJZo2=jpOQ98p2mSOsTukyA9NPFoah6COCZMYS7pr0KYF8fg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-advocacy |
On 26 April 2012 17:00, Chris Travers <chris(dot)travers(at)gmail(dot)com> wrote:
> On Wed, Apr 25, 2012 at 11:34 PM, Brendan Jurd <direvus(at)gmail(dot)com> wrote:
>> SELECT p.age_years(date '2012-05-01')
>> FROM person p
>>
>> As I recall, my idea did not achieve escape velocity, but I still
>> think it would a) extend the dot-call syntax to a more useful pattern,
>> b) bolster our justification for the "O" in "ORDBMS", and c) actually
>> be kind of awesome.
>
> Dot syntax should be replaced by something less ambiguous, though.
> The problem is that you currently have issues in some versions of Pg
> where p.name might be the name of the person, or it might be the p
> record cast as something almost identical to varchar(63)....... The
> only reason this is not an issue on more recent versions of Pg is that
> implicit casting to text types has been dropped so this doesn't really
> address the underlying problem.
The "method" dot-call syntax in my suggestion would always have
parentheses, p.name() for example, so I don't think it suffers from
the same ambiguity as the historical dot-call syntax.
Regardless, I don't know how we could replace the dot in the syntax.
Wouldn't it be unprecedented to have an OO syntax which uses a
different operator to reference attributes than the one to reference
methods? That would really drain much of the notational convenience
out of the feature.
Cheers,
BJ
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2012-04-26 12:12:47 | Re: Should we drop the "object" from ORDBMS? |
Previous Message | Chris Travers | 2012-04-26 07:00:33 | Re: Should we drop the "object" from ORDBMS? |