Skip to content

Commit

Permalink
news: add entry for #395
Browse files Browse the repository at this point in the history
Signed-off-by: László Várady <laszlo.varady@anno.io>
  • Loading branch information
MrAnno committed Nov 28, 2024
1 parent e5ab73f commit a8375e7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions news/fx-feature-395.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
`=??` assignment operator

Syntactic sugar operator, which could slightly improve performance as well.

It can be used to assign a non-null value to the left-hand side.
Evaluation errors from the right-hand side will be suppressed.

For example,

`resource.attributes['service.name'] =?? $PROGRAM;` can be used instead of:

```
if (isset($PROGRAM)) {
resource.attributes['service.name'] = $PROGRAM;
};
```

0 comments on commit a8375e7

Please sign in to comment.