What are the top few most human-readable programming languages?
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
What are the top few most human-readable programming languages?
Hello,
I am trying to consider the top three or so most human-readable computer programming languages. After doing a little research, I have pretty much settled on Python being one of them. Perhaps it would even be the number one... in terms of being easy to read and comprehend by human beings. But what would a few more be?
Thank you
You're really asking which languages are highest level. And framed like that, it can't answered with individual choices, but languages can certainly be categorized into "candidate" and "not a candidate".
It really does depend on if you know the language whether it is readable to you. I find bash very readable, but I'm sure others don't think so. C is not very readable even tho I know it reasonably well. It's all the special characters and nuances that get me. It is readable but hard to read. There are solutions to this tho, for example there is a way to add more readable keywords using a .h file, I just forgot the name of it.
A determined programmer (or, just a careless one) can write unreadable code in any language. . .
lol. and i agree. But as a language, readability was always natural for Cobol (assuming the developer read English). For example, a typical line of Cobol code might be
Code:
Add ItemAmount to InvoiceTotal.
which code itself is self-explanatory, with no need of comments
The outline way of defining data is likewise self-evident and human readable. e.g
makes obvious the relationship between the various fields. So that
Code:
Move spaces to StudentName
will obviously initialize all 3 fields associated, but will leave other fields untouched.
Perhaps I am not fully objective, since Cobol was my first programming language, and the intuitive nature of Cobol meant that I was able to concentrate on writing good logic without having to be a computer geek. I didn't have to understand how my logic was being converted into machine code. To learn C and other languages, I had to learn to think more like the computer and less like a human.
As has been said above, a language is only readable if you know it. If you know assembly, then assembly is perfectly readable. If you know C, then C is perfectly readable. I find your Cobol examples to be ugly as sin...WTF is "PIC 9(4)." or "PIC X(15)." supposed to mean? What does "Add ItemAmount to InvoiceTotal" do? Is InvoiceTotal just a running sum? A list? An array? What does "add" mean? Are you appending ItemAmount to a list or are you doing a simple mathematical sum? Not knowing Cobol, I find your examples to be very difficult to read and understand. That's how it is with all languages in my experience.
Perhaps because from the beginning of your career you were programming in C or Assembly and had to learn to think like the computer you were programming. So you have a hard time understanding that 'add' means 'add' as any non-tech person would already know intuitively. The non-tech would not immediately wonder whether an array or list were involved. Likewise, most folks learned in elementary school how to use an outline with numbered levels. Applying this non-tech understanding to data storage is, in my opinion, much more intuitive and human readable than having to understand structures, arrays, pointers, indirection and such - which was the OPs original question.
I'd say python, but yeah, depends on what human is reading them
In the case of python, I think it depends a lot more on what human wrote it.
I would never include python in a list of the more human readable programming languages. Python was designed to be easy to write, not easy to read and it is especially easy to write bad python code than no one can read. Maybe some people write serious software in readable python, but I've never seen an example. The only big python projects I've had the misfortune to dig into were worse unreadable unmaintainable garbage than you are likely to find in almost any other language.
Pascal is more human readable than most programming languages for the same reasons it is a terrible language: It was designed to be readable by a really stupid compiler, without consideration given for the fact that making it that readable makes it much harder to write. While a human is very different from a really stupid compiler, there are many characteristics in common. Pascal is easier to read in ways that are independent of who is reading it.
Similarly, Java is easier to read than C++, in ordinary size projects, for pretty much the same reasons that Java is harder to use to write really large complicated software.
Ultimately, the size and complexity of the project becomes an overwhelming factor in whether the language is human readable. No one should claim C++ is high on the list of human readable programming languages, but as you scale up to bigger and more complicated projects, eventually C++ becomes the most human readable programming language, because it holds up better to bigger and more complicated projects than any other commonly used language.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.