-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should .flatmap
be really DEPRECATED or not?
#430
Comments
To me the explanation in the original version of the doc is good enough to support deprecation. I just wonder how much is it used in the ecosystem? |
Is there a Raku deprecation policy document? I mean something outside of the user doc. If there is, I'll probably delete/hide this comment. Am I right that info about deprecations appears in multiple locations?: 1. Rakudo Liz introduced a trait that can be applied to some declarations (just routines and attributes I think) to mark them as deprecated. Code that uses a deprecated routine/attribute then produces a warning/error message when the code is run. User code can use it, and she's also used it in Rakudo to mark some built in routines/attributes as deprecated. But, aiui, this was not applied to the And I'm guessing the existing trait has not been applied to some other built ins that are "supposed" to be deprecated. And I'm guessing there are features that aren't particular routines or attributes that are supposed to have been deprecated but instead other features that the I wonder if it would be sensible for there to be something like a 2. Roast Roast is supposed to be the spec, not Rakudo. Perhaps deprecated annotations are supposed to appear in roast before they appear in Rakudo. But I don't recall seeing any. If that's right, then maybe we can figure out how to have an 3. User doc The user doc mentions deprecations. 4. Discussions Like this issue. So, multiple locations for recording info about deprecations, all subject to being incomplete, wrong, contradictory, right? |
thought I would start my thoughts by looking at the docs - under type Any (https://docs.raku.org/type/Any#routine_map), we have
yet method but that got me to thinking about the family of special maps aka the most germane parts of ChatGPT's opinion is:
and
My conclusion from this and other research is that So I think it would be a small positive to keep it and a very low benefit to remove it. ~librasteve |
I vehemently oppose deprecating this, as stated in the previous discussion on the subject:
|
Yeah, I think it's the kind of feature you'll use often if you have a functional programming state of mind, but not at all if you don't. |
Having now had more exposure to the use case for flat mapping at While I hesitate to bely my superficiality, I'll admit that most of my initial antipathy towards I dislike the naming scheme, full-stop. I do wonder whether these would all have been adverbial multis for Which is to say, as someone who partially instigated this ticket: let's close this and keep EDIT: I clearly forgot about the |
This commit opens a different way of specifying map variants. This is mostly for cosmetic reasons and operates under the impression that named argument adverbs, had they been available, would have been used over the smashedcase versions we currently offer. * [flatmap](Raku/problem-solving#430)
Some history about
.flatmap
. Before the Great List Refactor (GLR) the.flatmap
method had slightly different semantics than it has now. Probably as part of the GLR, @jnthn changed it to the current semanticsUntil this documentation change the
.flatmap
method was documented as DEPRECATED when in fact it has never been marked as such. And its semantics where that as were suggested in the documentation.My original thought was: well, that's easy! A simple documentation simplification and all is well.
However, it has been brought up that maybe it would be a good idea to DEPRECATE
.flatmap
in 6.d and remove in 6.e.Hence this Problem Solving Issue
The text was updated successfully, but these errors were encountered: