3 ms·
because the code base has several million lines and eclipse is a horrific user experience? The example posted is a horrible use of autocomplete. >const int ca
by serge2k 12y ago
because the code base has several million lines and eclipse is a horrific user experience?
The example posted is a horrible use of autocomplete.
>const int calculated = [&] {
auto l = lock();
auto first = stage1();
auto second = stage2();
return combine(first, second);
}()
No idea what that does. It takes 2 variables of some type and does something too them. There is some sort of lock there too. I guess.
- nawitus 12y agoSo is the core problem that there's no decent IDE for C++ which can identify the "autocompleted" types to the developer?
- SamReidHughes 12y agoNo, the core problem is a developer that thought "auto" exists to make code easier to write instead of existing to make code easier to read.
- serge2k 12y agoI use sublime text and it works fine, combined with a robust code search tool. The problem here is poorly written code. I shouldn't need an IDE to tell me what is going on, the code should do it.
- Stasis5001 12y agoThe problem there is not with auto, it's with the function naming. If you don't know what the function lock does, how would writing Lock l = lock() help? Also, stage1 and stage2 are awful function names in this context.
- cechner 12y ago> stage1 and stage2 are awful function names in this context Clearly that was an example created to demonstrate the lambda idiom, it wasnt real code
- bcoates 12y agoDoes return combine( stage1(), stage2() ) bother you too? because that infers the return-types of stage1() and stage2() as well.
- serge2k 12y agoyes, for different reasons.