Giter VIP home page Giter VIP logo

Comments (4)

StrayAlien avatar StrayAlien commented on August 22, 2024

Hi @opatrascoiu - if we may, I'd like to go into this PR next meeting. Some stuff I don't quite get - like many of the K2-MatchesFunc-* functions are asserting a null return value. The regex is valid regex so not a syntax error. If the regex is valid and does not have a match then we'd be asserting false wouldn't we? The tests are not marked as 'error', so, not sure I understand.

from tck.

opatrascoiu avatar opatrascoiu commented on August 22, 2024

@StrayAlien

Regarding #643 (comment).

According to the XML spec

The effect of calling the first version of this function (omitting the argument $flags) is the same as the effect of calling the second version with the $flags argument set to a zero-length string.

Also in FEEL the null value is used to define missing values or error. It felt that considering flags == null equivalent to flags == "" is more user friendly, as a default value is provided for matches() and replace() functions. Happy to discuss this.

from tck.

opatrascoiu avatar opatrascoiu commented on August 22, 2024

@StrayAlien Regarding

#643 (comment)

These test cases were extracted from the XML test suite (see link at the top of the test files). I should have set the errorFlag to true. PR #648 addresses that. Well spotted !

from tck.

StrayAlien avatar StrayAlien commented on August 22, 2024

Hi @opatrascoiu , I hope you are well.

My apologies for letting the one take so long to repsond. It is not so much about the XML spec, or these specific functions. It is more about whether, as a general thing in DMN, passing null as a value for an optional argument is the same as not passing an argument. IMO it is not. If null is not in the semantic domain of the optional argument then I would think it is an error.

The act of passing a null as a argument probably suggests an error with the argument value itself. Like, if I call foo(x,y) and y is optional but, if present should be a string wth value 'a', or 'b' .... but I pass y as a value of null then I think this should be an error - it is not the same as calling foo(x) . I am passing a value outside the semantic domain for y. It is not the same as not passing an argument.

I hope that makes sense.

from tck.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.