Discussion:
[xquery-talk] annotations in function-declarations
Rob Stapper
2015-07-23 14:49:58 UTC
Permalink
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



---
Dit e-mailbericht is gecontroleerd op virussen met Avast antivirussoftware.
https://www.avast.com/antivirus
Ghislain Fourny
2015-07-23 14:56:05 UTC
Permalink
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
Post by Rob Stapper
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>
_______________________________________________
http://x-query.com/mailman/listinfo/talk
Rob Stapper
2015-07-23 16:12:46 UTC
Permalink
Always forget to reply to all.



Van: Rob Stapper [mailto:***@lijbrandt.nl]
Verzonden: donderdag 23 juli 2015 17:33
Aan: 'Ghislain Fourny'
Onderwerp: RE: [xquery-talk] annotations in function-declarations



Hello Ghislain,



That sure makes sense, I’ve thought about that too.

On the other hand the following construction is completely legal and the annotated-function is dynamically created:



· declare function mySpace:constructor( $a, $b, 
.) { %myAnnotation( ‘wishThisWasAvariable-InsteadOfAliteralValue’) function ( $f ){$f( $a, $b, 

..)} } ;



The function and probably so also its annotation is created dynamically.



So it needs a little feasibility-study . Is there room for a little feasibility-study ;-) ( I know capacity)



Kind Regards,

Rob



Van: talk-***@x-query.com [mailto:talk-***@x-query.com] Namens Ghislain Fourny
Verzonden: donderdag 23 juli 2015 16:56
Aan: Rob Stapper
CC: ***@x-query.com
Onderwerp: Re: [xquery-talk] annotations in function-declarations



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 <***@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



_____


<https://www.avast.com/antivirus> Afbeelding verwijderd door afzender. Avast logo

Dit e-mailbericht is gecontroleerd op virussen met Avast antivirussoftware.
www.avast.com <https://www.avast.com/antivirus>




_______________________________________________
***@x-query.com
http://x-query.com/mailman/listinfo/talk





---
Dit e-mailbericht is gecontroleerd op virussen met Avast antivirussoftware.
https://www.avast.com/antivirus
Rob Stapper
2015-07-24 06:07:57 UTC
Permalink
I got my answer: not even Java is flexible here. I’m probably over asking, again. Even have to reconsider my case.



Regards,

Rob



Van: Rob Stapper [mailto:***@lijbrandt.nl]
Verzonden: donderdag 23 juli 2015 18:13
Aan: ***@x-query.com
Onderwerp: FW: [xquery-talk] annotations in function-declarations



Always forget to reply to all.



Van: Rob Stapper [mailto:***@lijbrandt.nl]
Verzonden: donderdag 23 juli 2015 17:33
Aan: 'Ghislain Fourny'
Onderwerp: RE: [xquery-talk] annotations in function-declarations



Hello Ghislain,



That sure makes sense, I’ve thought about that too.

On the other hand the following construction is completely legal and the annotated-function is dynamically created:



· declare function mySpace:constructor( $a, $b, 
.) { %myAnnotation( ‘wishThisWasAvariable-InsteadOfAliteralValue’) function ( $f ){$f( $a, $b, 

..)} } ;



The function and probably so also its annotation is created dynamically.



So it needs a little feasibility-study . Is there room for a little feasibility-study ;-) ( I know capacity)



Kind Regards,

Rob



Van: talk-***@x-query.com [mailto:talk-***@x-query.com] Namens Ghislain Fourny
Verzonden: donderdag 23 juli 2015 16:56
Aan: Rob Stapper
CC: ***@x-query.com
Onderwerp: Re: [xquery-talk] annotations in function-declarations



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 <***@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



_____


<https://www.avast.com/antivirus> Afbeelding verwijderd door afzender. Avast logo

Dit e-mailbericht is gecontroleerd op virussen met Avast antivirussoftware.
www.avast.com <https://www.avast.com/antivirus>




_______________________________________________
***@x-query.com
http://x-query.com/mailman/listinfo/talk





---
Dit e-mailbericht is gecontroleerd op virussen met Avast antivirussoftware.
https://www.avast.com/antivirus

Continue reading on narkive:
Loading...