Hacker News new | ask | show | jobs
by peterbotond 4484 days ago
the way i handle c++ complexity is to limit its feature usage to exercise its strength letting it help me solve the problem.

c++ is a big language with big grammar, as such offers a lot of different ways to say the same thing. each different construct is understood by a different set of code-readers, same way as in a complex human language. commenting c++ code is part of writing c++ due to this complexity, in my practice.

in a complex grammar, the order of words makes a difference and certain relation of grammatical constructs must be obeyed to remain comprehensive and understandable by most people.

communications using formal grammar makes it more understandable, versus slang. however both formal and informal convey the same information for the respective group of people.

in a programming language, pondering publicly about good and bad practices and their merit helps reading code, of course, with comments.

1 comments

> c++ is a big language with big grammar, as such offers a lot of different ways to say the same thing

This is what I hate about Perl, so why do I like C++?

I'm quite willing to admit I'm irrational, but it feels like there's a big difference between the "there's more than one way to do things" style of both languages.