Hello chapel-developers,

PR #6555 will make a minor change in the `local` statement grammar. Here
are some important changes that comes with this PR:

- Formerly valid syntax `local foo();`, will give a syntax error. a `do`
  statement or a curly-block will be required. So, the snippet must
  be replaced with `local do foo();` or `local { foo(); }`

- The main motivation of this change is to add an optional conditional
  expression to `local` statements. With this PR, you'll be able to do

  local x.locale == here {
    process(x);
  }

  which will be compiled identical to

  if x.locale == here {
    local  {
      process(x);
    }
  }
  else {
    process(x);
  }

For more details see:

Pull request: github.com/chapel-lang/chapel/pull/6555
Issue: github.com/chapel-lang/chapel/issue/6392

Thanks,

Engin Kayraklioglu
Graduate Research Assistant
The George Washington University

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Chapel-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-developers

Reply via email to