fenfire-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fenfire-dev] PEG swamp_easier--benja: An easier API for Swamp


From: Tuomas Lukka
Subject: Re: [Fenfire-dev] PEG swamp_easier--benja: An easier API for Swamp
Date: Mon, 22 Sep 2003 13:41:41 +0300
User-agent: Mutt/1.5.4i

On Mon, Sep 22, 2003 at 01:34:32PM +0300, Benja Fallenstein wrote:
> Tuomas Lukka wrote:
> >On Mon, Sep 22, 2003 at 12:54:32PM +0300, Benja Fallenstein wrote:
> >I feel better about find(), since it 
> ...
> >And it's consistent with what code is there already. If there's
> >a change, change all the occurrences.
> ...
> >>find...Triples: Any particular reason?
> >
> >we have find_..._Iter, it would be easiest to put the return type
> >there and once we have used swamp for several years and *know* the
> >best solution, we'll take that as the return type.
> 
> ARGH. Didn't I make myself clear? I want these to be **replaced** by the 
> TripleIter method(s). The PEG proposes all current methods in 
> Graph/ConstGraph dealing with getting/adding/removing triples to be 
> replaced by those in the PEG.

Well, this certainly wasn't explicitly mentioned in the PEG.

I'd prefer to have both, and to deprecate the _Iter methods - for now.
There's a lot of code that uses _iter right now...

> The points for TripleIter-- less code, automatically returned to the 
> Graph for re-use in next ``get()``/``find()``-- hold for iterating over 
> a single element of the triple as well; and due to the design of the 
> Collections API, using Iterator buys you nothing in compatibility (you 
> cannot create sets from it, etc.)
> 
> (If you want to use Collections API, see ``getSubjects()`` and 
> ``getObjects()``.)

I agree, this is probably better.
I'd still prefer first deprecating, to be removed at a future time.

> >>Clarified on IRC: The issue is what happens if there is more than one 
> >>matching triple.
> >>
> >>The current way is to throw NotUniqueException.
> ...
> >>[S]ignalling an error isn't necessarily correct.
> >>
> >>Jena returns just an arbitrary one of the matching triples in a similar 
> >>situation; I'm leaning towards that.
> >
> >I'd *really* hate that one -- I'd prefer swamp to have totally clear
> >semantics, with the only arbitrary thing being the order in which a set
> >is iterated through. 
> 
> Other suggestions? Don't have singular ``getObject()``?

I think the error is ok.

> >>>Issue: Names. subj, pred, obj would be more consistent, i.e.
> >>>up to the *end* of the second consonant group.
> >>
> >>Yes, but these are also impossible to pronounce... "SUB-djjjj"
> ...
> >
> >"s", "p", "o"?
> 
> Hmmm. I thought that ``i.s``, ``i.p``, ``i.o`` are too abbreviashish, 
> but might be ok.
> 
> Other alternative: "subject," "predicate," "object."

I still prefer subj, pred, obj...

In order of preference:

1. subj, pred, obj
2. subject, predicate, object - too long
--- (a LONG distance here, I dislike the ones below)
3. s, p, o - too short
4. sub, pred, ob - "sub" and "ob" are confusing because they are
                   used as prefixes in english words - 
                   subroutine, obdurate, ...

        Tuomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]