[xquery-talk] annotations in function-declarations
Ghislain Fourny
g at 28.io
Thu Jul 23 07:56:05 PDT 2015
Hi Rob,
Just off the top of my mind, I would expect some challenges with respect to
dynamically vs. statically known information. With a literal, all
annotations are known statically. With a variable, this is no longer the
case. This may have unexpected implications for function type checking, etc.
I hope it makes sense.
Kind regards,
Ghislain
On Thu, Jul 23, 2015 at 4:49 PM, Rob Stapper <r.stapper at lijbrandt.nl> wrote:
> Hi,
>
>
>
> Is it possible that in a nearby release of the XQUERY-standard the
> parameters of the annotations in function-declarations can also hold
> string-variables?
>
>
>
> e.g.
>
> · declare %myAnnotation( $annotationValue) function f ( ){()} ;
>
> · instead of: declare %myAnnotation( ‘myLiteral’) function f (
> ){()} ;
>
> ·
>
>
>
> My use-case is that I want to be able to check some of my functions for
> specific properties during processing.
>
>
>
> - it would be nice if the source of the annotationValue at
> function-creation could be the same as at function-checking, e.g.
>
> · declare variable $annotationValue := ‘testValue’ ;
>
> · declare %myAnnotation( $annotationValue) function f( ){()} ;
>
> · declare function test( $f, $annotationValue){ …..test
> annotation:%myAnnotation of function( $f) for value: $annotationValue…..} ;
>
> · ………….. test( $myFunction, $myTestValue) ……..
>
>
>
> - another, more important point is that the constructor-function for these
> annotated functions can be called from different places in my program with
> different values. So actually function-creation is also during processing.
>
>
>
> Is this something that W3C sees as a useful enough addition and is it
> feasible within the given capacity?
>
>
>
> Thanks in advance,
>
> Rob Stapper
>
>
> ------------------------------
> [image: Avast logo] <https://www.avast.com/antivirus>
>
> Dit e-mailbericht is gecontroleerd op virussen met Avast
> antivirussoftware.
> www.avast.com <https://www.avast.com/antivirus>
>
>
> _______________________________________________
> talk at x-query.com
> http://x-query.com/mailman/listinfo/talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://x-query.com/pipermail/talk/attachments/20150723/45b0802d/attachment.html>
More information about the talk
mailing list