Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

10
  • 4
    "more difficult to create bad designs"? Not enough more difficult to make a difference. Actually, I think they encourage bad designs, by preventing bad designs from doing anything obviously bad (like crashing), the naive programmer never knows that improvement is needed or possible. Commented Mar 29, 2011 at 19:12
  • @Ben: I'm not saying I think Java/C# have the right answer -- I'm saying that's what their design goals were. (I like working in C++ more than those languages, and it has very different design goals) Commented Mar 29, 2011 at 19:51
  • @Ben -- The languages are decidedly strongly typed so that they crash upon compilation on as many obvious errors as possible (e.g. function paths not returning values, switches without breaks etc.). They'll also crash upon array bounds being broken rather than just roll on the way C/C++ does. While there are obviously languages that are even more strict, I have no idea where you get the idea that these languages are designed not to make problems obvious -- because the exact opposite is true. Commented Apr 2, 2011 at 11:47
  • 1
    @Rei: Funny that you mention arrays, which are by design not type-safe in either Java or C#. But I'm not saying that these languages aren't designed to catch some errors that are possible in C++. I'm saying that they are advertised as "safe", "no possibility of memory leaks", etc. and many programmers have bought into these lies and not learned how to deal with critical low-level issues. Commented Apr 2, 2011 at 14:56
  • 2
    @Ben Like I said, there are obviously languages that are more strict (e.g. Haskell), but saying covariance/contravariance makes the language (or even arrays) not type-safe is a polarized overstatement. C# and Java do in many ways encourage beginners, and whether or not beginners should be encouraged is a philosophical question that I don't have an answer for -- but there's a difference between encouraging beginners and encouraging bad designs. Languages are supposed to prevent good programmers from making clumsy mistakes; they're not supposed to weed out bad programmers. That's HR's job. Commented Apr 3, 2011 at 8:46