Hacker News new | ask | show | jobs
by k__ 3126 days ago
Was he trying to be funny after he did c++?!
1 comments

It is possible to write simple and obvious code in C++. A lot of people just choose not to. ;-)
> It is possible to write simple and obvious code in C++. A lot of people just choose not to. ;-)

You still need to be C++ fluent enough to be able to read other people's code. And it's not like everybody has the same definition of "simple and obvious".

> And it's not like everybody has the same definition of "simple and obvious".

That is a very good point. I had an interesting discussion with a Perl programmer once regarding the use of Perl's default variable $_ - to him, code that relied heavily on it was straightforward and readable. But to a newcomer, it can be very tricky to figure out what is going on. And even to an experienced Perl programmer, it can increase the mental overhead of parsing code significantly if s/he is not used to it.

>And it's not like everybody has the same definition of "simple and obvious".

No, but it's like we can expect of people to more or less agree on a definition of "simple and obvious" or else be outliers.

True, though languages should be designed so that it is difficult to write obscure, tricky or otherwise unreadable code.
For better or worse, languages that put am emphasis on readable code tend to remain not-so-popular. Python is an example, but Ada or Pascal are relatively unpopular these days.

But that is one thing I like about Go, because "idiomatic" Go code tends to be very straightforward and readable.

I mean C++ isn't going to disappear anytime too soon, but I like where we're headed with language design. Python isn't just popular, it's monumentally popular, and I think that's a great sign. In my eyes, Ada and Pascal aren't missed, precisely because there are better choices for new projects.

I love what they've done with Go from my experience with it so far, they hit the target on a number of design fronts.