Child pages
  • SModel language Treatment of null values
Skip to end of metadata
Go to start of metadata

Treatment of null values

In an OO-language like Java it's pretty common to have a lot of checks for null values in the form of expr == null and expr != null statements. These are necessary to prevent null pointer exceptions from occuring. However, they at the same time increase the code clutter and often make code difficult to read. In order to alleviate this problem, we MPS treats null values in a liberal way. For example, if you ask a null node for a property, you will get back a null value. If you ask a null node for its children list, you will get empty list, etc.

  • No labels