Comments (21)
@GRbit yes, I would accept PRs and I'm currently working on a v2
to use generics :)
from go-funk.
Hum, when @thoas told that branch with generics will be available for contribution next week
, I did not expect it will be at the end of the week (not available so far).
GO 1.18 has been released more than 2 weeks ago and 2 most popular packages with helpers (go-funk and lo) can't provide operational maintenance for generics.
V2 branch with generics support could be released asap, so interested in generics community would provide PR's for helpers they are interested in.
Instead currently everyone, who wants to use generics helpers, but would like to use it with well-known package instead of self-written implementation are blocked by maintainers of the go-funk and lo packages.
IMO if you are an author of the demanded by community package and you don't have time to actively maintain package - need to find more maintainers.
from go-funk.
Two weeks passed . @thoas
from go-funk.
@metalrex100 I will, it will be available next week :)
from go-funk.
branches will be used to separate implementations between generics and non-generics, the same way go-redis is doing it for example.
People will be able to send PRs on v1
too.
from go-funk.
@thoas is there any functions that you did not implement so far with generics?
I may provide PR's with their implementation 🙂
from go-funk.
Instead currently everyone, who wants to use generics helpers, but would like to use it with well-known package instead of self-written implementation are blocked by maintainers of the go-funk and lo packages.
I don't feel blocked. Instead I can continue using this excellent module or move to any generics-based package including my ohne patches until something more mature comes up. Big thank you to @thoas for all his work sofar.
from go-funk.
@andig when codebase is pretty big - it require to spend much time on replacing your self-written solutions with some well-known package.
Yes, it takes more time than expected I will have a first draft a the end of the week. I have created a v2
branch, you can send me some PRs if you want.
I don't want to rush it, since it will be a complete rewrite and a lot of BC :)
from go-funk.
You can switch to samber/lo which is pretty complete.
from go-funk.
Looking forward to this. Greatly appreciated
from go-funk.
I‘ve just gone through the exercise and replaced funk by generics, mainly /x/exp/slices, which proved for my uses straightforward. The main omission in Go regarding slices is missing Map/ Reduce/ Filter afaikt.
from go-funk.
@thoas create please v2 branch so it became possible to contribute.
from go-funk.
Note golang/go#45955 (comment) which links https://github.com/luraim/fun
from go-funk.
@andig when codebase is pretty big - it require to spend much time on replacing your self-written solutions with some well-known package.
from go-funk.
@thoas it will be actually almost another lib. Methods names will be still the same))
from go-funk.
@thoas it will be actually almost another lib. Methods names will be still the same))
Yes, that's why it will be separated to a complete new branch and installed via gomod using github.com/thoas/go-funk/v2/
. There is a lot of things to rewrite and we must focus on basic utilities first.
from go-funk.
@thoas indeed. New implementation also must be placed in v2
folder according to GO versioning system.
from go-funk.
Or you want to deal with versioning by always having 2 branches instead of single master with 2 directories: root and v2?
from go-funk.
@gopherhw I know, lack of time :)
from go-funk.
Is there any progress on this?
from go-funk.
@yangxikun to be honest, zero from my side. I switched to github.com/samber/lo
from go-funk.
Related Issues (20)
- .Contains() but with a regexp match
- About the problem of short_if.go file in CRLF format HOT 2
- IsEmpty check error HOT 1
- about map merge HOT 1
- All functions return interface{} HOT 1
- About GetOrElse HOT 1
- how about adding argMax which return the index of max element from a slice ?
- Accept comparison function to contains/difference/etc.
- Generics coming into Go 1.18 HOT 2
- 同学,您这个项目引入了6个开源组件,存在1个漏洞,辛苦升级一下 HOT 1
- Q: Is there any utility for merge HOT 3
- .Partition() - same interface as filter but returns two arrays
- WithAllowZero doesn't work on slice of structs with inner struct
- reflect: call of reflect.Value.Set on zero Value HOT 1
- [feature request] funk.Get map value with non-trivial key
- About WithAllowZero?
- `funk.Get` panics when indirectly accessing fields of `nil` embedded structs
- Does Find() work on a map? HOT 1
- Does not work.Uniq for uuid HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-funk.