wrapnils: add ??. which returns an Option (#16931)
* wrapnils: add option-like API with ??., isSome, get * fix test after rebase * cleanups * fix changelog * address comments regarding get vs unsafeGet
This commit is contained in:
parent
11a7fa68f6
commit
8942586fa6
3 changed files with 73 additions and 67 deletions
|
|
@ -149,9 +149,11 @@ provided by the operating system.
|
|||
- Added experimental `linenoise.readLineStatus` to get line and status (e.g. ctrl-D or ctrl-C).
|
||||
|
||||
- Added `compilesettings.SingleValueSetting.libPath`
|
||||
|
||||
- `std/wrapnils` doesn't use `experimental:dotOperators` anymore, avoiding
|
||||
issues like https://github.com/nim-lang/Nim/issues/13063 (which affected error messages)
|
||||
for modules importing `std/wrapnils`.
|
||||
Added `??.` macro which returns an `Option`.
|
||||
|
||||
- Added `math.frexp` overload procs. Deprecated `c_frexp`, use `frexp` instead.
|
||||
|
||||
|
|
@ -174,6 +176,8 @@ provided by the operating system.
|
|||
- Added `strip` and `setSlice` to `std/strbasics`.
|
||||
|
||||
|
||||
- Added to `wrapnils` an option-like API via `??.`, `isSome`, `get`.
|
||||
|
||||
## Language changes
|
||||
|
||||
- `nimscript` now handles `except Exception as e`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue