Re: Objects and Relations

From: David BL <davidbl_at_iinet.net.au>
Date: 29 Jan 2007 21:41:03 -0800
Message-ID: <1170135663.288742.184430_at_v33g2000cwv.googlegroups.com>


On Jan 30, 2:01 pm, Gene Wirchenko <g..._at_ocis.net> wrote:
> "David BL" <davi..._at_iinet.net.au> wrote:
>
> [snip]
>
> >These are clear disadvantages of RM here. Are there any advantages?
>
> Oh, come on! Surely you can troll better than that?

Do you realise I'm only talking about strings?

I'm not trolling. I'm quite serious. Consider the following relation

    charsInString(StringId, Index, Char) :- StringId has Char at Index

What benefit does this relation give you (ie on top of an OO implementation of a string). Show me some elegant and useful string processing that can be achieved using RA. Won't you almost always join/select for the simple purpose of looking up a character in a given string at a given index position?

I can only think of some "silly" uses like finding frequencies of characters, or finding all the locations of a given character.

Something important like searching for a given sub-string is actually quite difficult to specify in the RA.

If you want to deal with strings declaratively (not procedurally) then use a functional programming or logic programming language. RM seems a poor fit. Received on Tue Jan 30 2007 - 06:41:03 CET

Original text of this message