Skip to content

Commit

Permalink
Update release note with breaking changes for (.)
Browse files Browse the repository at this point in the history
  • Loading branch information
yannham committed Jan 8, 2024
1 parent 1b08873 commit 9cef281
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
Next version (planned as 1.4)
=============================

Breaking changes
----------------

* The curried dot operator added in Nickel 1.3 was implemented the wrong way:
the arguments were flipped, meaning that `(.) foo bar` was `bar."%{foo}"`
instead of the expected `foo."%{bar}"`. While the initial flipped
implementation seems more useful for piping operations using the reverse
application operator `|>`, it's inconsistent with all other curried
operators, where `(<operator>)` is always define as `fun x y => x <operator>
y`. To ensure consistency, and because the initial behavior was an overlook
and not a conscious design decision, we decided to change the definition of
`(.)` to match the other curried operator by flipping its arguments.

To fill the gap, we also introduced `std.record.get` with the same
definition as the `(.)` introduced in Nickel 1.3. To migrate, you can either
flip the arguments of the curried dot as a function `(.)` whenever possible,
or you can just replace it with the new `std.record.get`.

Version 1.3
===========

Expand Down

0 comments on commit 9cef281

Please sign in to comment.