Hacker News new | past | comments | ask | show | jobs | submit login

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.




The 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.


> 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


Does

  return combine( stage1(), stage2() )
bother you too? because that infers the return-types of stage1() and stage2() as well.


yes, for different reasons.


So is the core problem that there's no decent IDE for C++ which can identify the "autocompleted" types to the developer?


No, 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.


I 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.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: