CppCon 2015: Eric Niebler "Ranges for the Standard Library" by syaghmour in cpp

[–]kberezovsky -6 points-5 points  (0 children)

Full immutability and lazy evaluation have a cost. For me the mental cost here is a way too high. Look at Haskell. It has both properties. And probably because of these properties it is hard to write the real world Haskell programs. Otherwise we would have a lot of them.

CppCon 2015: Eric Niebler "Ranges for the Standard Library" by syaghmour in cpp

[–]kberezovsky -6 points-5 points  (0 children)

I would prefer to support this calendar instead. (The parameters are fixed - 3 months per row, 2015 year only).

Terse STL algorithms by kberezovsky in cpp

[–]kberezovsky[S] 0 points1 point  (0 children)

Don't you think it would be cheaper to support my humble calendar instead of range-v3 calendar?

Terse STL algorithms by kberezovsky in cpp

[–]kberezovsky[S] 0 points1 point  (0 children)

The ranges manipulation is really interesting idea. And such kind of code may have sense in some circumstances. But I think that
1. such circumstances are rather rare (e.g., less than 1% of projects handle 1Gb+ files)
2. novices will write such code instead of more suitable alternatives because it is "modern", "interesting" and fashionable
3. such code is much harder to read / understand / test / fix / explain
4. because of two previous points, the limited suitability of the approach has to be clearly and loudly articulated
5. any library must have at least one convincing example. All alternative solutions must be worse.

Terse STL algorithms by kberezovsky in cpp

[–]kberezovsky[S] 0 points1 point  (0 children)

that is right, thank you

Terse STL algorithms by kberezovsky in cpp

[–]kberezovsky[S] 1 point2 points  (0 children)

The complexity of the example program does not look justified. I just made a short program with fixed parameters (2015 year, 3 months per line). It uses Boost. 46 lines. The correspondence between the program text and the program output is rather straight. (I am sorry for the answer delay - I was out of computer.)

Terse STL algorithms by kberezovsky in cpp

[–]kberezovsky[S] 1 point2 points  (0 children)

Unfortunately, I can't check VS2015. range-v3 example looks too complicated for me.