You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@metron.apache.org by jjmeyer0 <gi...@git.apache.org> on 2017/11/05 18:17:10 UTC

[GitHub] metron pull request #814: METRON-1277 Add match statement to Stellar languag...

Github user jjmeyer0 commented on a diff in the pull request:

    https://github.com/apache/metron/pull/814#discussion_r148965731
  
    --- Diff: metron-stellar/stellar-common/README.md ---
    @@ -100,6 +102,28 @@ In the core language functions, we support basic functional programming primitiv
     * `FILTER` - Filters a list by a predicate in the form of a lambda expression.  For instance `FILTER([ 'foo', 'bar'], (x ) -> x == 'foo' )` returns `[ 'foo' ]`
     * `REDUCE` - Applies a function over a list of input.  For instance `REDUCE([ 1, 2, 3], (sum, x) -> sum + x, 0 )` returns `6`
     
    +### Stellar Language Match Expression
    +
    +Stellar provides the capability to write match expressions, which are similar to switch statements commonly found in c like languages, but more like
    +Scala's match.
    --- End diff --
    
    @ottobackwards sure. Right now, I think our match statement syntax is just a nicer syntax for if then else blocks. I would just state something along those lines. I know in the future it will be more.


---