Vale icon indicating copy to clipboard operation
Vale copied to clipboard

Join iterable

Open tomerghelber opened this issue 2 years ago • 1 comments

Hey, I wanted to move the join function in List to stringutils and make it get any iterable instead of just list. What do you think?

tomerghelber avatar Apr 09 '22 20:04 tomerghelber

That sounds like a good end-goal. It might be tricky to get an iterable, as List/HashSet/HashMap don't really implement any interfaces like Iterable right now.

If I was to do it today, I'd use concepts like where Prot["__call", Refs(&F, &K, &V), _] which means "there exists a function __call(&F, &K, &V)_". Later on, we'll be able to collect those concepts into traits like Rust does, which might be more in line with what you're thinking.

AFAIK, the only uses of Vale yet are for one-off experiments so breaking changes are still fine IMO, and any possible breakage from this change would just be fixed with an import, so it sounds good!

(Adding tests to prevent breakages are still top of my priorites though, just 'cuz)

Verdagon avatar Apr 10 '22 00:04 Verdagon