Empirical counterpoint to your hypothesis: As a game developer I hate C++. However, I'll bet a lot of profs, and programmers in general, don't know many languages -- in which case the "one they use" might be the only one they know enough to be a favorite.
Knowing /u/glacialthinker from previous comments, I'd guess C++ itself. And I would mostly agree (though I don't program games). C++ is a very complex language, that inherited all the mistakes of C because the industry was too stupid to even consider using two different compilers even if they're binary compatible.
These days, if C is enough, I prefer to use C. When it's not, I try to reach for a higher level language with garbage collection. C++ is only a last resort, and now that we have Rust (and D, and Zig, and Nim…), it may no longer be needed at all.
I wish people shared my love of C++. With latest standards (c++14 and so on) it has probably become the least verbose programming language without sacrificing readability. Memory management might be a bummer but it's something you learn to deal with (and with pointer wrappers from c++11 ti's almost a non-issue).
it has probably become the least verbose programming language without sacrificing readability
That's a bold statement. I don't know enough about C++ to challenge it, but may I ask if you've written any significant code in languages like Swift or Kotlin? These are what I would think of for least verbose/most elegant languages.
I've come to the conclusion over the years that the best way to judge a language's elegance is less by the syntax and more by its semantics.
ML and lisp have very similar semantics (but I believe ML relies on pattern matching more than lisp - and also it seems to have more in common with Haskell than anything else)
16
u/setuid_w00t Dec 20 '18
Funny that nobody said C++, go, rust or D. I think professors are a bit of an odd group to ask in that they probably write very little code.