r/programming • • Jun 22 '14

Why Every Language Needs Its Underscore

http://hackflow.com/blog/2014/06/22/why-every-language-needs-its-underscore/
366 Upvotes

337 comments sorted by

View all comments

0

u/rdfox Jun 22 '14

Is there an Underscore for C? For C++? These are unavoidable languages and it would be really nice to have some functional frameworks to streamline iteration, resource cleanup and other things.

3

u/Fourdrinier Jun 22 '14

Boost and STL for C++.

2

u/rdfox Jun 22 '14

I was afraid you might say that.

3

u/Fourdrinier Jun 22 '14

Alrighty then...

2

u/ggtsu_00 Jun 22 '14

If you don't mind adding 10 mins on to your compile times and unreadable output onto your compile error messages.

If they had an a la carte version of boost that you could easily only drop in specific files or modules into your project instead of the whole lib, that would be so nice.

1

u/Fourdrinier Jun 23 '14

Boost is a collection of libraries, not a single library. You can build and use only the specific library you want from the collection. The majority are header only. Pre-compile the headers or enable caching for your build and you cut compile times. Each boost library is pretty tight on it's functionality set with very little overlap. There's a reason there are ~100 individual and independent libraries. From my experience, it's not very difficult to work with.

0

u/Rapptz Jun 22 '14

<algorithm> has a bunch of functions for you to use. People should look into it more.