Most of our developers turn it off in all our code unless there is a specific 
reason to use it and then, and only then, we turn it on.

JMTB,

Keith
breinhol...@ldschurch.org<mailto:breinhol...@ldschurch.org>

From: general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Steve Mallen
Sent: Friday, May 21, 2010 4:46 AM
To: general@developer.marklogic.com
Subject: Re: [MarkLogic Dev General] Question about function signatures and 
type checking

Thanks Sam.

Looks like this is a common gotcha.  I think we'll disable it in all our code :)

Cheers,
-Steve

On 21/05/2010 11:22, Sam Neth wrote:
Function mapping.  Here's a recent thread about this topic:

 http://markmail.org/thread/n2eyj2t56fmor7to

On May 21, 2010, at 3:06 AM, Steve Mallen wrote:


Hi folks,

Does anyone know how Mark Logic deals with function signature type
checking when calling functions?

I ask because I recently went on a bit of a wild goose-chase debugging
session, the result of which was that a function we'd defined was not
being called at all (because of a mismatch in the types of the arguments
being passed).  There was no type error raised by ML.

As a test case, I've createed the following XQuery, which gives an error
in Saxon:

declare function local:blah($foo as xs:string) {
    concat($foo, " called")
};

local:blah( () )

    Error: "An empty sequence is not allowed as the first argument of
local:blah()"

But when I run this against ML 4.1, the whole module just returns the
empty sequence (and doesn't appear to call the function at all).  There
is no error raised.

Can anyone help explain this behaviour?  I would have expected a type
exception to be thrown...  am I missing something?

Many thanks,
-Steve

--
Senior Software Engineer, Semantico Limited
<mailto:steve.mal...@semantico.com>  <tel:+44.1273.358239>
Registered in England and Wales no. 03841410, VAT no. GB-744614334.
Registered office Lees House, 21-23 Dyke Road, Brighton BN1 3FE, UK.

Check out all our latest news and thinking on the Discovery blog
http://blogs.semantico.com/discovery-blog/

_______________________________________________
General mailing list
General@developer.marklogic.com<mailto:General@developer.marklogic.com>
http://developer.marklogic.com/mailman/listinfo/general







_______________________________________________

General mailing list

General@developer.marklogic.com<mailto:General@developer.marklogic.com>

http://developer.marklogic.com/mailman/listinfo/general






--

Senior Software Engineer, Semantico Limited

<mailto:steve.mal...@semantico.com><mailto:steve.mal...@semantico.com> 
<tel:+44.1273.358239>

Registered in England and Wales no. 03841410, VAT no. GB-744614334.

Registered office Lees House, 21-23 Dyke Road, Brighton BN1 3FE, UK.



Check out all our latest news and thinking on the Discovery blog

http://blogs.semantico.com/discovery-blog/


 NOTICE: This email message is for the sole use of the intended recipient(s) 
and may contain confidential and privileged information. Any unauthorized 
review, use, disclosure or distribution is prohibited. If you are not the 
intended recipient, please contact the sender by reply email and destroy all 
copies of the original message.


_______________________________________________
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to