Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I sometimes see people stating exactly this, but then writing:

`doSomethingToACar(selectCarById(carId));`

Kind of weakens the argument. I'm not sure what's the best approach, but I'm usually ok with autos even when the type is not explicitly known - when reading code, I do not really need to know what exact type a variable has ("it's a car, goddamnit, it says so in the name!"), just how it's used (and then meaningful function names become very important).



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

Search: