Re: Storing data and code in a Db with LISP-like interface
Date: Fri, 28 Apr 2006 09:00:56 +0200
Message-ID: <4451bda3$0$31656$e4fe514c_at_news.xs4all.nl>
Neo wrote:
>>person (john). >>judge (john). >>fruit (apple1). >>fruit (tomato1). >>vegetable (tomato1). >>vegetable (broccoli1). >>thing(X):-vegetable(X). >>thing(X):-fruit(X).
>
>
>
> With respect to your comment that dbd's script looks like bitPlumbing,
Heh. I meant for bitplumbing to refer to my activity when extracting the prolog-clauses (when you did not like the term re-engineering for that activity). If a little extra verbosity brings benefits - and you claim it does - I see no harm there, espacially when I can generate the extras with some form of scripting most of the time.
> an alternate way of doing the above Prolog statements in dbd is:
>
> (createInst 'john' 'person' 'judge')
> (createInst 'apple1' 'fruit')
> (createInst 'broccoli1' 'vegetable')
> (createInst 'tomato1' 'fruit' 'vegetable')
>
> The createInst function's first parameter is the name for the new
> instance which is classified by the remaining parameters. If those
> classifications do not exist, they are automatically created and
> related as instances of thing. I haven't use this function in dbd
> scripts thus far as it obscures too many underlying relationships which
> makes it difficult for users to understand the queries later.
Ok - good to be verbose here; nice to know there is a shorter form. Received on Fri Apr 28 2006 - 09:00:56 CEST