Closed MateuszKowalewski closed 1 year ago
The extensions are helpers for writing Libretto code in point-free style. It was ubiquitous before Libretto had lambdas. I was adding such helpers on a by-need basis (and sometimes for symmetry, like co-/contra-), so they likely had uses, which might have disappeared after some code was rewritten using λ.
Anyway, I would keep these extensions around. So it is appropriate to test them.
Exactly! If it's there on purpose it should have some usage side also.
If Scala could finally mark dead-code this issue here would heave popped up much earlier, I guess.
Not to have usage sides (in tests and / or examples) is risky. I've broken code by one of the first attempts for the "implicit / given" refactoring without noticing. Only after manually testing I've found out that I may not change all implicit classes to extensions. With proper tests this wouldn't have happened.
(Like said, it could be even that now the methods discussed here in this ticket are broken also…)
Thanks for looking into the testing issue in general! This will help reduce the risk of breakage by clueless people a lot! :smile:
As there is already a ticket regarding testing this can be closed I guess.
Currently the extensions on
FocusedCo
andFocusedContra
aren't used (and form the last one onlycurry
is used).Is this by design?
If so this needs tests, I guess.
I could turn out that the DSL extensions actually don't even work after the change to
extension
methods from implicit classes. There is an issues with that in CoreLib. Could be the same here.