-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
I think massiv is a great library and delivers great performance. However, I believe it is also very hard to use due to the complicated types. Here are some rather radical ideas which might improve the situation.
- Assume
Seqeverywhere which is usually the right choice. If parallel computation is desired,Parshould be specified when computing. - Remove function names with
'at the end. I think the partial functions should be the default ones; indexing/dimension errors are usually programming errors. - Be less polymorphic. Make
makeArrayand other generation functions return delayed arrays to aid type inference and make it less confusing. - Support
OverloadedRecordDotforIxNandSzNto get the individual coordinates - The doc page for
Data.Massiv.Arrayis very long and it is often hard to find the right functions. Maybe put theMvariants in a different place and have a separate docs for them (e.g.Data.Massiv.Array.Safe). - Combine the safe and partial functions into one by combining
Dimension nandDim, i.e. provide a constructor forDimensionthat is not checked. - Replace
index,readwith a partial function. I would imagine that many people use them in combination withfromJust. - There are potentially too many different representations. However, I am not too sure what to do here.
Please feel free to tell me what you think about these changes. Not all of them might be good but I included them to be thought-provoking.
These changes are obviously breaking changes and would need a major version update. Maybe others also have some ideas if backwards compatibility restrictions could be ignored.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels