logo       

Re: flowrrr - how to structure a function?: msg#00068

Subject: Re: flowrrr - how to structure a function?
Hi,

That's the kind of use case that the scripting extension of XQuery
(XQueryP) that Jonathan was mentioning here is supposed to solve.

This is not an isolated use case, that's a more and more frequent use
case scenario, and the current XQuery 1.0, nor the Update spec do
 no good for it.

I think it should be possible to rewrite those functions in a way that makes them if not side-effect free at least idempotent. If you then have later functions depend on input values from earlier functions you should be safe. E.g. session:invalidate() should be session:invalidate($session-token) and session:begin() should return that $session-token. I'd say it's probably worth the effort.

The scripting extension of XQuery should help though, it applies the
side-effects right away and guarantees a deterministic evaluation order
for subexpressions with side-effects (among other things).

I'm not sure it's possible to do so in every use case, and especially if it's also elegant to do so, so there might be a case for XQueryP.

Regards,
Martin

--
Martin Probst
X-Hive Corporation
martin-aAA5O4jD/7TQT0dZR+AlfA@xxxxxxxxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
region.costa-ri...    user-groups.lin...    lang.prothon.us...    xfree86.cvs/200...    finance.aqbanki...    ietf.smtp/1993-...    web.turbogears....    jakarta.cactus....    yellowdog.gener...    php.gtk+.genera...    org.region.indo...    hurd.l4/2005-10...    culture.religio...    apple.fink.gene...    db.mysql.window...    bluez.devel/200...    security.pgp-ba...    video.blender.d...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe