Collection types
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 20/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- fsharp
- Lĩnh vực
- tooling
Hướng nghiên cứu
Bắt đầu bằng việc xem xét Foldable.fs và Collection.fs, tập trung vào filter, ofSeq, ofList và intersperse. So sánh các yêu cầu về tính trừu tượng của chúng với các phần giải thích được liên kết về Haskell và PureScript, sau đó xác định những hàm nào thuộc về từng mô-đun. Công việc được xem là hoàn tất khi các hàm collection được sắp xếp lại một cách nhất quán mà không thay đổi hành vi API dự kiến.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
This is a long standing design issue, however it doesn't seem to have any impact in usability, but the real impact seems to be that it's a bit confusing how to organize the source code.
The question arise on how can we unify List, Array, Seq and so on.
Foldable concentrates most operations but not all of them, for example singleton is not a Foldable operation, it seems to be exactly the opposite of a Foldable.
Then we have some stuff that falls in the middle, typically operations that take a "CollectionX" as input, do something and return the same type of "CollectionX".
There is lot of confusion because normally these collection types are required to be Foldable, but that requirement is not enough, they must belong at the same time to another abstraction.
Collection and Unfoldable abstractions seems to provide an answer, here's an explanation from a Haskell implementation and here's a Purescript implementation of Unfoldable
Reflecting over this, we can conclude (among many other things) that placing Filter in Foldable.fs is simply wrong. Filter seems to be one of the only functions from Collection, which means that is a Foldable and an Unfoldable at the same time.
So I propose to start organizing our functions accordingly. Starting to move to Foldable everything that is specific to Foldable but doesn't require Unfoldable, and what doesn't fall there should be moved into Collection.fs for now (later we can decide to partition it into Unfoldable.fs and Collection.fs).
I have the feeling that ofSeq (ofList as well) belongs to Unfoldable, see also: http://hackage.haskell.org/package/unfoldable-0.9.6/docs/Data-Unfoldable.html
If my memory serves me right, it was moved to Foldable because intersperse (which requires foldable and monoid as showed in purescript implementation) had a generic default overload that use ofSeq but this is an optimization, not a requirement. An optimization for Unfoldables, now we would have to move it to Collection.fs because of this which is more a technical limitation.
- Ngôn ngữ chính
- F#
- Star
- 941
- Fork
- 106
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của fsprojects/FSharpPlus
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
fsprojects/FSharpPlus#683 · 1 bình luận · 2 reaction ·
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
fsprojects/FSharpPlus#678 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
fsprojects/FSharpPlus#644 ·
-
breaking change F#+ v2.0
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
fsprojects/FSharpPlus#643 ·
-
lens type signature Đang mởbreaking change F#+ v2.0
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
fsprojects/FSharpPlus#641 ·
Tất cả issue của fsprojects/FSharpPlus
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
OpenwaterHealth/openmotion-bloodflow-app#604 · 1 bình luận ·
-
good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
rust-bitcoin/rust-bitcoin#6930 · 1 bình luận ·
-
Solved site promotion gate fails on runner PHP patch drift (expects 8.2.33, runner installs 8.2.34) Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Automattic/blocks-engine#2161 ·