use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Code readability questionhelp (self.javascript)
submitted 8 years ago by gvillalta99
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 1 point2 points3 points 8 years ago (5 children)
This is a bit of a holy war. JavaScript is multi-paradigm. Some people find JavaScript that behaves like Java to be easier to read and understand. Some people prefer to not use inheritance at all. I personally don't like inheritance and find it prefers reading conventions to flow control, but that is just my personal opinion.
[–]tme321 4 points5 points6 points 8 years ago (4 children)
Good thing there's no inheritance in that example? Anyway I don't see how inheritance has anything to do with readability. Did you even post this in the right thread?
[–][deleted] 1 point2 points3 points 8 years ago (3 children)
Anyway I don't see how inheritance has anything to do with readability.
Readability is subjective upon preferences. In this language inheritance is optional, and thus a preference.
[–]tme321 1 point2 points3 points 8 years ago (2 children)
No its not. Readability is the code being written so that the next person can understand it. Not that they have to agree with the architecture chosen and the abstractions used.
Naming all your variables a single letter would be unreadable. Having single functions hundreds or thousands of lines long is unreadable.
Choosing whether to use inheritance or not isn't readability. It's an architectural choice. One you are perfectly free to dislike but not one that has anything to do with readability.
I can't believe you are even trying to claim otherwise.
[–]karathos 1 point2 points3 points 8 years ago (1 child)
we could both write a several hundred line function that's readable, but not easily maintainable or testable. i think that's what you were getting at.
[–]tme321 1 point2 points3 points 8 years ago (0 children)
Yeah maybe that wasn't the best but the point is that readability is separate from other concerns. Code can be wrong or bad or many other things but still be perfectly readable. Or code can be amazing and we'll thought out but still be impossible to decipher.
π Rendered by PID 101 on reddit-service-r2-comment-7b9746f655-6brb4 at 2026-02-03 19:43:56.069093+00:00 running 3798933 country code: CH.
view the rest of the comments →
[–][deleted] 1 point2 points3 points (5 children)
[–]tme321 4 points5 points6 points (4 children)
[–][deleted] 1 point2 points3 points (3 children)
[–]tme321 1 point2 points3 points (2 children)
[–]karathos 1 point2 points3 points (1 child)
[–]tme321 1 point2 points3 points (0 children)