There has been a lot of discussions about this. Here's the proposal:
The following mutable methods will become immutable in 3.0.0: utc, local, zone, add, subtract, startOf, endOf, lang, also in duration: add, subtract, and lang.
As a start, all methods will be duplicated with methodNameMute variants. We also need immutable variants named methodNameImmute. From 3.0 the plain old methods will start using the immutable option by default.
What is debatable is:
- should
lang be made immutable
- should all the getters/setters (including
get/set) be made immutable too
- naming of the mutable and immutable versions of the methods
- and of course -- should we do the switch, or just stop at the immutable API
The good part is we can make immutable versions of the methods today and decide later on what to do. If we switch it would also mean the 2.x branch would be around for quite some time after 3.x is out.
@icambron @timrwood @gregwebs @yang @lfnavess @soswow @langalex
There has been a lot of discussions about this. Here's the proposal:
The following mutable methods will become immutable in 3.0.0:
utc,local,zone,add,subtract,startOf,endOf,lang, also induration:add,subtract, andlang.As a start, all methods will be duplicated with
methodNameMutevariants. We also need immutable variants namedmethodNameImmute. From 3.0 the plain old methods will start using the immutable option by default.What is debatable is:
langbe made immutableget/set) be made immutable tooThe good part is we can make immutable versions of the methods today and decide later on what to do. If we switch it would also mean the
2.xbranch would be around for quite some time after3.xis out.@icambron @timrwood @gregwebs @yang @lfnavess @soswow @langalex