Another little point... it's a bit confusing to ha...
# kotest
d
Another little point... it's a bit confusing to have the CodePoints in the same
Arb
as the actual arbitraries... maybe they should be in a
CodePoint
companion object?
s
you mean Arb.Codepoints.foo ?
d
No, just Codepoint.foo... the Arb would just make the line longer...
s
so just a top level object
All arbs are currently defined on Arb, for easy discoverability
d
My point is that they usually are used in combination with Arb.string(..., CodePoint.XXX), although they are Arbs themselves, I wonder if anyone uses them as such. So they could have their own "namespace" to indicate what is available to Arb.string, and they won't interfere with the real Arbs.
s
I see your point, perhaps typealiases ?
d
My concern is code complete...
s
you want to de-clutter code complete ?
d
Yeah, and make it clearer what options are available in the two contexts. I don't think a typealias would help, but I guess that deprecated CodePoints on Arb would help migrating and I'd suppose the IDE is smart enough to deprioritize deprecated things.
s
You're probably right that they're never used outside of strings.
If you want to move them to a new top level object, and put in deprecated typealiases for backwards compatbility then I would merge that PR
👍🏼 1
d
Maybe adding a companion object to CodePoint itself?
And then making them extension functions off it?
s
Yes that seems like a good approach.
d
It doesn't seem that a typealias can be made as an extension function off Arb.Companion?
I think I might have to leave the original functions as deprecated to delegate to the new ones.
s
Ah ok well that works yeah
d
In the meantime, I might as well also replace the deprecated Char.toInt() with Char.code?
(in codepoint.kt, I mean)
s
Only if its not 1.5 only
d
Oh, you're not using any 1.5 in the newer versions? I guess I'll leave them then.
s
Its compiled against 1.5
But we don't want to force users off 1.4
Saying that actually 5.0 will be 1.5 only
So yeah change it
👍🏼 1
d
Funny, I tried running StringArbTest, but the IDE couldn't find
a.codePoints()
?
But the tests passed, so I guess it's a cache problem.
I should do the PR against the master branch?
s
Yes
s
looks good