News for hackers. Stuff that matters.
Re:How Do You Define Elegant Code? by joe_the_user on Wednesday August 03, 2011 @02:25PM (#2842322)
The thing I'd say about "elegant" is that elegance achieves some combination of desirable characteristics so well that it stands out as a noticeably better solution. If you can use three somewhat obscure lines to do what someone else take five readable pages to do, you're elegant even the code isn't that readable.

That said, since true elegance is kind of exceptional, it probably shouldn't be the criteria for acceptable code - "clear, readable and reasonably" is a better standard to have.

There are no comments on this comment yet.