Skip to content
This repository was archived by the owner on May 24, 2022. It is now read-only.

Move type-piracy on startwith/endswith to Compat.jl #4

Closed
oxinabox opened this issue Mar 9, 2020 · 5 comments · Fixed by #17
Closed

Move type-piracy on startwith/endswith to Compat.jl #4

oxinabox opened this issue Mar 9, 2020 · 5 comments · Fixed by #17
Labels
good first issue Good for newcomers

Comments

@oxinabox
Copy link
Member

oxinabox commented Mar 9, 2020

I think this is a good point and we need to settle it before v1.0 of the package

Originally posted in #3

@KristofferC:

Just namespace these inside Wrangler and have people do import Wrangler.startswith to opt into your version of the functions? No need for type piracy.

@oxinabox:

I debated this option. It ones one of a few, others being type-piracy, and making up new names prefixedby and suffixedby

I would have said it as putting in the docs telling people to always do:

using Wrangingly
using Wranging: startswith, endswith

rather than just using Wrangling.

I think @nickrobinson251 convinced me that type-piracy was the least bad of many options

@nickrobinson251:

yeah... i'm no longer sure type-piracy is the best option. But 🤷‍♂

My thinking was:

  • The alternatively-named-function feels a bad compromise because they are really the exact same as startswith/endswith... so they really should be methods of those functions.
  • But introducing the name-clash with Base is also pretty un-fun for users.
  • Which leaves us with type-piracy... and this is the least-bad version of that bad thing
@oxinabox
Copy link
Member Author

oxinabox commented Mar 9, 2020

Type-piracy would be fine (/should move to Compat.jl) if the following julia issues are resolve in favor of doing this in Base
JuliaLang/julia#33193
JuliaLang/julia#35033

@oxinabox oxinabox changed the title Remove type-piracy on startwith/endswith Remove type-piracy on startwith/endswith ? Mar 9, 2020
@oxinabox
Copy link
Member Author

These have been done in Julia 1.5. this need to be moved to Compat.jl

@oxinabox oxinabox changed the title Remove type-piracy on startwith/endswith ? Move type-piracy on startwith/endswith to Compat.jl Apr 16, 2020
@nickrobinson251
Copy link
Contributor

xref #14

@nickrobinson251
Copy link
Contributor

the 1-arg / "curried" versions of startswith/endswith should move to Compat.jl (following JuliaLang/julia#35052). The Symbol piracy stays here.

@nickrobinson251 nickrobinson251 added the good first issue Good for newcomers label Jun 4, 2020
@nickrobinson251
Copy link
Contributor

JuliaLang/Compat.jl#719

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants