3 ms·
I'm not sure if it's a question of indoctrination; I'd prefer to think that it is much more a lack thereof. Many things are "developed" without any appreciation
by btschaegg 10y ago
I'm not sure if it's a question of indoctrination; I'd prefer to think that it is much more a lack thereof. Many things are "developed" without any appreciation of elegance - and the bit of old, overdesigned and overcomplicated C++ code I've seen tells me that Java's culture problem just stems from everyone moving away from there and continuing their style in Java-Land.
No language will ever be able to combat this - the only strategy you can have is to make your language so different and confusing to regular people that they won't use it; but I doubt that would result in good languages being created.
If you have a look at how modern C++ is presented and explained nowadays, there's much more focus on readable/useful code and actual design. Many language communities go this route (Clojure, Python, what have you), but that doesn't stop the average Joe to ignore those advices it if he so desires.
Add in some crunch time where everything must be implemented ASAP and without consideration of the consequences and voilà: You end up shovelling snow around[1].
That being said, I especially like Clojure's approach to things. For example: Turns out good, maintainable C++ uses const almost everywhere - to avoid messes, you try to encapsulate mutable parts as much as possible (unless performance dictates otherwise). This is a thing that is still very clunky in C# and Java (and it seems very much overkill to use virtual inheritance for this. Say hello to IReadOnlyDictionary<T>). In contrast, Clojure makes almost everything read-only and uses mutation at very specific points. This is great - although of course you won't be writing any high fidelity videogames this way.
Edit: Of course, when I say elegance, I realize that it's very hard to get actual things done from the Tower of the Elephant Tusk[2]. But yeah, stopping once and a while to understand/consider your problem and possible implications of your implementation gets you a long way.
[1]: http://gizmodo.com/programming-sucks-why-a-job-in-coding-is-absolute-hell-1570227192 http://gizmodo.com/programming-sucks-why-a-job-in-coding-is-...
[2]: http://thecodelesscode.com/case/143 http://thecodelesscode.com/case/143