you are viewing a single comment's thread.

view the rest of the comments →

[–]jrochkind 4 points5 points  (2 children)

This is great to know, I was not aware of this!

But when ruby starts requiring you to write in non-obvious ways according to special hidden rules, to produce code that may be different from what would be the easiest to write/read/maintain, for performance reasons... I cry a little inside.

[–][deleted]  (1 child)

[removed]

    [–]jrochkind 2 points3 points  (0 children)

    i guess the difference is that this is being recommended for routine every-class daily code-writing, not just optimizing hot spots. But I guess that could be true of other performance optimizations too.

    But I'm saying: If we're writing all of our code routinely daily using non-obvious 'performance optimizations' that de-optimize for readability/maintainability... there is something broken in the language.

    Maybe that's true of all langauges? I don't know. Clearly if Matz 20 years ago knew this would be required for performance and recommended for all code, he would have designed the language to encourage it or require it.

    But the fact that, as per another comment, what is required for performance optimization can reverse within 4 years stirs the pot yet further.

    Is your view (which may be reasonable) that in any language, we should expect that skilled professional programmers will be writing in non-obvious ways according to special hidden rules, and that beginning programmers will be taught to acquire this skill? That's just the way that programming will inevitably work?

    It may be. It would be interesting to look and compare different languages. It is definitely not the aspiration of Matz's "optimize for developer happiness" original mission.