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

Then I would not call you "C purist". The "C purists" I knew, refused to much typing. It also was the reason they refused other languages for example such with "tiresome long" words like "begin" and "end".

I on my part (in spite using C myself) think that typing code is not that problem, but typing the right code. And -- at least when you are not alone programming -- every code line is read 10 or more times more often than it is written. So, to be clear and understandable is much more valuable to me, than come away with less strokes ...

I've been plagued by supposed 'purists' all my career. What they are, really, is bad at typing. They won't refactor a crap method because it would take them too long to type it all

The best investment in my career I ever made is, typing class in high school. It has separated me from the crowd at every job. Its more important that so many other irrelevant 'purist' ideals.

I never had a formal typing class and I guess I am still not that fast in typing, but with the years I learnt my keyboard (even in the US and the German variant) and for my opinion I am typing fast enough now, since I have to think sometimes between the strokes, still.

But when I look back at my career, I never had the feeling, to be to slow in typing even for Module II -- a language, that would never ever get the approval of the "C purists".

Doing refactoring, I use a simple trick myself -- I do much copy and paste ;) ... and delete (!) the copied stuff afterwards.

I think, as a programmer, it is a good property to be lazy -- but you should merely use it for code reuse instead for avoiding typing.

Oh, I forgot: I use vim, a typing avoidance editor. You can avoid lot of keystrokes or mouse moves with that editor. But not to avoid real content.

> I on my part (in spite using C myself) think that typing code is not that problem, but typing the right code.

What do you think of the auto keyword in C++? I've personally never found typing out the types to be a problem.

Hi, I must admit, that I am not totally up-to-date when it comes to C++, since I am not hopping on the newest standards as soon as they are there. And I am not actively programming in C++ currently.

But I don't think, that "auto" was specified to reduce typing. I see it more as a possibility to follow the "DRY" principle (don't repeat yourself).

There might be cases, where for example the return types of functions might change and you don't want to change every caller.

Templates are of course an other example, because the return types of templates oftentimes are depending of the input types. You of course can use those template declaration stuff, but it is very ugly and oftentimes clumsy.

I also found a nice example, where it really can help to make things more easy to read, here:


I think, the real usages are rare, that is also the reason, it was specified rather late.

Applications are open for YC Winter 2023

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