[xquery-talk] FW: annotations in function-declarations

Rob Stapper r.stapper at lijbrandt.nl
Thu Jul 23 23:07:57 PDT 2015


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:r.stapper at lijbrandt.nl] 
Verzonden: donderdag 23 juli 2015 18:13
Aan: talk at x-query.com
Onderwerp: FW: [xquery-talk] annotations in function-declarations

 

Always forget to reply to all.

 

Van: Rob Stapper [mailto:r.stapper at 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-bounces at x-query.com [mailto:talk-bounces at x-query.com] Namens Ghislain Fourny
Verzonden: donderdag 23 juli 2015 16:56
Aan: Rob Stapper
CC: talk at 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 <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

 

  _____  


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

 


_______________________________________________
talk at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://x-query.com/pipermail/talk/attachments/20150724/1a55867c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 823 bytes
Desc: not available
URL: <http://x-query.com/pipermail/talk/attachments/20150724/1a55867c/attachment.jpe>


More information about the talk mailing list