digitalmars.D.learn - See docs compiler message
- ixid (7/7) Mar 06 2018 /opt/compilers/dmd2/include/std/algorithm/iteration.d(663):
- Uknown (5/12) Mar 06 2018 I agree that compiler error messages should be improved. If you
- Steven Schveighoffer (7/15) Mar 06 2018 It's referring to the docs for std.range.Transposed.save (the deprecated...
- ixid (11/15) Mar 06 2018 Thanks, I had found that but that is not an explanation unless
- ixid (3/20) Mar 06 2018 What is the correct way to iterate a range of ranges as
- Steven Schveighoffer (9/25) Mar 06 2018 There are 2 problems. One is that Transposed offered .save as a member,
/opt/compilers/dmd2/include/std/algorithm/iteration.d(663): Deprecation: function `std.range.Transposed!(string[], cast(TransverseOptions)0).Transposed.save` is deprecated - This function is incorrect and will be removed November 2018. See the docs for more details. If it's going to say 'See the docs' how about linking the docs or even just specifying which docs it's referring to?
Mar 06 2018
On Tuesday, 6 March 2018 at 14:28:52 UTC, ixid wrote:/opt/compilers/dmd2/include/std/algorithm/iteration.d(663): Deprecation: function `std.range.Transposed!(string[], cast(TransverseOptions)0).Transposed.save` is deprecated - This function is incorrect and will be removed November 2018. See the docs for more details. If it's going to say 'See the docs' how about linking the docs or even just specifying which docs it's referring to?I agree that compiler error messages should be improved. If you are still wondering though, https://dlang.org/phobos/std_range.html#transposed is the relevant documentation
Mar 06 2018
On 3/6/18 9:28 AM, ixid wrote:/opt/compilers/dmd2/include/std/algorithm/iteration.d(663): Deprecation: function `std.range.Transposed!(string[], cast(TransverseOptions)0).Transposed.save` is deprecated - This function is incorrect and will be removed November 2018. See the docs for more details. If it's going to say 'See the docs' how about linking the docs or even just specifying which docs it's referring to?It's referring to the docs for std.range.Transposed.save (the deprecated symbol) I thought that was clear. Now, there aren't actually docs for Transposed, but you can find it if you look at std.range.transposed: https://dlang.org/phobos/std_range.html#transposed -Steve
Mar 06 2018
On Tuesday, 6 March 2018 at 14:37:27 UTC, Steven Schveighoffer wrote:Now, there aren't actually docs for Transposed, but you can find it if you look at std.range.transposed: https://dlang.org/phobos/std_range.html#transposed -SteveThanks, I had found that but that is not an explanation unless you have a lot of prior technical understanding of what save is and why it's not working. I guess it's a general doc quality issue - unless you're already very knowledgeable it's pretty much useless to understand the problem you have. I transposed a range of ranges to pass to a function to get the distance between characters in strings. That works fine, as does printing the result. But it then complains if I try to do anything like fold with the result.
Mar 06 2018
On Tuesday, 6 March 2018 at 14:50:05 UTC, ixid wrote:On Tuesday, 6 March 2018 at 14:37:27 UTC, Steven Schveighoffer wrote:What is the correct way to iterate a range of ranges as transposed does?Now, there aren't actually docs for Transposed, but you can find it if you look at std.range.transposed: https://dlang.org/phobos/std_range.html#transposed -SteveThanks, I had found that but that is not an explanation unless you have a lot of prior technical understanding of what save is and why it's not working. I guess it's a general doc quality issue - unless you're already very knowledgeable it's pretty much useless to understand the problem you have. I transposed a range of ranges to pass to a function to get the distance between characters in strings. That works fine, as does printing the result. But it then complains if I try to do anything like fold with the result.
Mar 06 2018
On 3/6/18 9:50 AM, ixid wrote:On Tuesday, 6 March 2018 at 14:37:27 UTC, Steven Schveighoffer wrote:There are 2 problems. One is that Transposed offered .save as a member, when it shouldn't have (it's not a valid forward range). This is clear from trying to even use it as a forward range. Even when you call save, it destroys the original. The other problem is that I think algorithms are seeing that .save is there, and thinking it's a forward range, so using it that way.Now, there aren't actually docs for Transposed, but you can find it if you look at std.range.transposed: https://dlang.org/phobos/std_range.html#transposedThanks, I had found that but that is not an explanation unless you have a lot of prior technical understanding of what save is and why it's not working. I guess it's a general doc quality issue - unless you're already very knowledgeable it's pretty much useless to understand the problem you have.I transposed a range of ranges to pass to a function to get the distance between characters in strings. That works fine, as does printing the result. But it then complains if I try to do anything like fold with the result.I have no idea how save is called, but apparently it is somewhere in there. -Steve
Mar 06 2018