[Versa] EBNF (start) (functions)
Michael Olson
Mike.Olson at fourthought.com
Thu Sep 15 15:40:02 MDT 2005
>>>
>>> That's a function call (or invocation).
>>>
>>
>> I understand. So a function reference is only valid as a parameter to
>> a function call then?
>
> Not necessarily. I think that it should be a true first class
> construct. This means it is an object like any other and can be used
> anywhere.
>
>
>> I guess i don't see the use case of
>>
>> @function foo() = all();
>> foo
>>
>> or
>>
>> foo - * -> *
>
>
Then, to clarify my question, what does this query return?
@function foo() = all() ;
foo
Or are you saying the functions are data types, but no result types?
>
>
>>>>>> | pattern
>>>>>> | operator-expression
>>>>>> | variable-reference
>>>>>
>>>>>> [21] function_call ::= qname '(' ( argument-expression ( ','
>>>>>> argument-expression ) * ) ? ')'
>>>>>
>>>>> ditto passing kwargs here
>>>
>>> I think if we support kwargs at all we should support them in both
>>> definition and invocation.
>>>
>>
>> I won't fight very hard on this, I just don't see a use case for them
>> WRT versa-query scoped function definitions.
>
> Let's set this one aside and both give it some thinking time (and maybe
> get feedback from others).
>
It actually cleans up the grammar to have it in there (one less
production of argument definition list) and you never know, maybe
someone will come up with a use.
Mike
>
> --
> Uche Ogbuji Fourthought, Inc.
> http://uche.ogbuji.net http://fourthought.com
> http://copia.ogbuji.net http://4Suite.org
> Use CSS to display XML, part 2 -
> http://www-128.ibm.com/developerworks/edu/x-dw-x-xmlcss2-i.html
> XML Output with 4Suite & Amara -
> http://www.xml.com/pub/a/2005/04/20/py-xml.html
> Use XSLT to prepare XML for import into OpenOffice Calc -
> http://www.ibm.com/developerworks/xml/library/x-oocalc/
> Schema standardization for top-down semantic transparency -
> http://www-128.ibm.com/developerworks/xml/library/x-think31.html
>
------------------------------------------------------------------------
-----------------
Mike Olson Principal
Consultant
mike.olson at fourthought.com +1 720 253 4662
Fourthought, Inc.
http://Fourthought.com
PO Box 270590, http://4Suite.org
Louisville, CO 80027-5009, USA
XML strategy, XML tools, knowledge management
More information about the Versa
mailing list