Skip site navigation (1) Skip section navigation (2)

Re: Should we drop the "object" from ORDBMS?

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 (view raw or flat)
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

In response to

pgsql-advocacy by date

Next:From: Kevin GrittnerDate: 2012-04-26 12:12:47
Subject: Re: Should we drop the "object" from ORDBMS?
Previous:From: Chris TraversDate: 2012-04-26 07:00:33
Subject: Re: Should we drop the "object" from ORDBMS?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group