Skip to content

v2.0.0

Compare
Choose a tag to compare
@elliotchance elliotchance released this 22 Mar 17:52
· 18 commits to master since this release
5757c16
Version 2: Rewrite with type parameterized functions for Go 1.18+ (#175)

v2 is a complete rewrite so that code generation is no longer required -
but we still have all the same benefits! There are some noteworthy
changes:

- There is no longer built-in types such as Float64s, Ints and Strings.
To chain operations you can use the new `Of`, `OfOrdered` and
`OfNumeric` functions.

- Append(), Extend() and Len() were not moved over, since the way they
would be used in v2 wouldn't provide any benefit over the standard
syntax. It may make sense for these to exist on the `Of*` functions -
but let's deal with that later.

- First() and Last() have been removed since there is no way to
substitute a zero value now. You will need to refactor these to use
FirstOr() and LastOr() respectively.

- Added String(), Float64() and Int() to help transform element types.