Hello,
I would like to share some confusion I have encountered while working with the recent core library updates, particularly around a number of newly introduced @deprecated M0235 annotations. I may be missing some context, so I am outlining my current understanding and uncertainties below.
1. Deprecation warnings during development
Recently, the compiler began reporting that the replace method in the core Map module, as well as parts of the Result module, are deprecated. Without any obvious accompanying explanation, this has made it difficult for me to understand how these APIs are expected to be used going forward.
2. Multiple Map mutation APIs marked as deprecated
While reviewing the source code, I noticed that Map.replace is not the only affected API. Other methods with similar purposes, such as Map.insert and Map.swap, are also annotated with @deprecated M0235.
From my current perspective, this seems to leave Map.add as the only non-deprecated mutation method. I am unsure whether this interpretation is correct. It also made me wonder what the original motivation was for providing multiple mutation APIs with overlapping behavior, and what considerations led to the decision to deprecate most of them now.
3. Deprecation of Map.toPure and Map.fromPure
I noticed that both Map.toPure and Map.fromPure are marked as deprecated.
In addition, similar to what is seen in the Result module, the type declarations in pure/Map, and in several other pure/ modules, are also annotated with @deprecated M0235. From my perspective, it is unclear whether this combination of deprecations is meant to discourage conversion between Map and pure/Map, or whether it indicates that all pure/ modules are planned to be deprecated.
4. Deprecation of type Result in the Result module
In the Result module, the type Result declaration itself is marked as deprecated.
Seeing that similar @deprecated M0235 annotations appear on type declarations in pure/Map and other pure/ modules, I am unsure whether these annotations are intended to discourage direct use of specific type aliases, or whether they indicate a wider plan to phase out entire modules rather than individual APIs.
5. Missing context around the December 10 update
It appears that the core library update on December 10 introduced a large number of @deprecated M0235 annotations. However, so far I have not been able to find related commits description, changelog entries, official documentation, or public discussions that explain the intent behind this change.
Because of this, I am finding it difficult to understand the broader direction these deprecations are pointing toward, or how developers are expected to adapt.
If the Result module, as well as other modules where the type declarations are marked with @deprecated M0235, such as Region, are intended to be fully deprecated and eventually removed, what are the recommended replacements for these modules?
I wanted to share these observations in case others have run into similar uncertainty, or in case there is existing context that I may have overlooked.
Thank you.