-
Notifications
You must be signed in to change notification settings - Fork 293
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
「StrDistance」 not documented #691
Comments
There are no spec tests for this sub. It is therefore not part of the Perl 6 language. It is a helper function to implement sub tr and different implementations may decide to use a different algorithm. It is not the job of the docs to force the hand of the language designer. If you believe this implementation detail should be elevated to a language feature file a RT against roast. |
Right. But it seems that nowadays we keep NOTSPECCED issues open. |
Also, there's at least one test that uses StrDistance… |
If that's the only one, then it won't make the 6.d review cut, as it merely used as many of the types it could to test Rat/FatRat coercion, rather than speccing that StrDistance is a thing. |
The synopses did at some point postulate a type that does what StrDistance
does (and maybe more?), and we should be fine on value identity because we
do everything in NFG anyway, but I'm not in how far we *need* the type.
For what it's worth, I intended it to be internal-ish when I implemented
it, but maybe we do need it specced. We definitely don't need it blocking
6.d though.
On Feb 13, 2018 19:11, "Zoffix Znet" <notifications@github.com> wrote:
Also, there's at least one test that uses StrDistance…
If that's the only one, then it won't make the 6.d review cut, as it merely
used as many of the types it could to test Rat/FatRat coercion, rather than
speccing that StrDistance is a thing.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#691 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AANcRXBEc1UJ8tPojxg9MYQ07lP_kQWoks5tUdBNgaJpZM4JJyZz>
.
|
So I'm thinking, if we don't want to spec StrDistance, do we really want the return value of $_ = ‘abcd’; say tr/bd/BD/ # StrDistance.new(before => "abcd", after => "aBcD") |
Probably not.
2018-03-03 12:05 GMT+01:00 Aleks-Daniel Jakimenko-Aleksejev <
notifications@github.com>:
… So I'm thinking, if we don't want to spec StrDistance, do we really want
the return value of tr/// to be unspecified?
$_ = ‘abcd’; say tr/bd/BD/ # StrDistance.new(before => "abcd", after => "aBcD")
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#691 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAB9Mxb4fmt5cBo_Nf23Yig6goBGwt4ks5tankSgaJpZM4JJyZz>
.
--
JJ
|
So, do we leave it notspecced or we use one of the tests there to document it? |
Also, there are several examples now |
http://irclog.perlgeek.de/perl6/2016-07-11#i_12823412
@peschwa said that it is internal-ish, but given that it is available to any user it should be documented anyway.
The text was updated successfully, but these errors were encountered: