Re: Ann: URI quasiquotes library

Michael Hendricks <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <CAFHuXuYk-vwiXG9JeEeeTGfhrf3-7K4yYGje-s=66jGrAxVu1g@mail.gmail.com>
On Mon, Jul 8, 2013 at 9:56 AM, Jan Wielemaker <[email protected]> wrote:

> You could also go for:
>
>         {|uri(Base)||to/resource|},
>

Good suggestion.

Glancing the code, and also from previous experience, we
> probably need some functional notation library.  Functions
> come very handy with quasi quotations as some of the work
> always needs to be done at runtime.
>

I agree that functional notation is convenient.  The packs
library(func)<http://www.swi-prolog.org/pack/list?p=func>
 and library(function_expansion)<http://www.swi-prolog.org/pack/list?p=function_expansion>
are
two of my favorites.

However, this functional notation need not be readable for
> the user.  Possibly we should introduce a functional notation
> library that does not affect normal Prolog syntax, but can be
> enabled by default.  Something like '$EVAL'(Term).
>

How do you imagine '$EVAL'(Term) behaving?  What kind of Term values are
allowed?  One of the most common patterns I use with
library(function_expansion) is to treat this:

    foo('$EVAL'(Term))

as if the code were this:

    call(Term, Output),
    foo(Output)

Is that what you have in mind?

-- 
Michael
-------------- next part --------------
HTML attachment scrubbed and removed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.