What are peoples view on what ranges should be? #17
Replies: 2 comments 1 reply
-
|
Ranges are a common interface or "narrow waist" between algorithms and data sources. The existence of a common interface means that, if you have N algorithms and M data sources, instead of having to write individual implementations for each of the N×M combinations, you can write each algorithm once, using ranges, and it will work with every data source. In other words, you can implement N×M use-cases with only O(N+M) code. This view implies that the range interface should be designed first and foremost to give authors of generic algorithms the primitives they need to write correct, efficient code. |
Beta Was this translation helpful? Give feedback.
-
|
Im asking so I can attempt to write a new std.range.interfaces that isnt based off a very slightly-modified stl concept(we airnt a 90's c++ and theres been decades of experience since, it shouldn't be hard to do better) see: #13 I know theres other people talking about it but I cant parse verbose enterprise grade nonsense can I summarize the "Copy Semantics" talk with one line of code: are there other considerations and people in this design space? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
There are 4? view points I see:
mine(i.e. correct one), ranges should be thought of as fragments of imperative "patterns"; a "slide" is when you use a += instead of a ++ in a for loop, as such you still have access to the index for several things that you dont in the current std, the 3 functions map pretty well to the 3 sections to the for loop and should probably not change, and in-place sorting just makes sense.
database query construction; map/reduce is something something database queries, there's all these jobs about data analysis; python data frames are considered to be great according to large sections of the general programming public; they probably dont see in-place sorting as sane, want more managed data structures and python compatibility
"source sink": walter wrote an article about how great ranges will be because bash scripting, maybe iostreams, idk if anyone still thinks that's the best metaphor.
functional; maybe someone will want immutable data structures to monad the nullable sumtypes; and will grab a random concept from lisp, haskell or apl and it will be named after a bird.
Are there more?
Beta Was this translation helpful? Give feedback.
All reactions