Need a language that is efficient, readable, easy to use and learn
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.
My guess is that what you want isn't a programming language, it's two programming languages. First learn Java. It's not efficient at all, but it's relatively easy and readable - think C++ with all the funky operators thrown out and no memory management to deal with. Once you get used to Java, you'll start to ask yourself "Boy, wouldn't it be nice if the language let me do this..., or that...". Then look at C++. When you come from Java, you'll be more than halfway there on the syntax, and the new things you need to learn will be the powerful techniques you were interested in.
That works well if you have the programmer in mind, but I think it develops bad habits to learn something that takes care of the dirty work first, then have to deal with remembering to do those things yourself with a more raw language.
I've tried lisp, it's kinda strange, very different from the other languages. I can't understand why there have to have so many parentheses tho, need to use emacs or some other IDE to help me close them. It's interesting tho.
As for the other question: I don't work as a programmer, but I make scripts quite often just to help me manage my system(s) here. Sometimes these scripts are very slow tho, so I code some parts of the script in C, then run that from within the script to speed it up, like when I have to nest loops for some reason (it's rare).
Since you mention LISP, perhaps you'd find another language interesting: PROLOG. There are FOSS PROLOG implementations available for download.
Personally, I have never been successful writing PROLOG programs because, I think, I tend to think too sequentially whilst PROLOG focuses on ends rather than means.
If you can get your mind around the PROLOG paradigm it can be a very powerful and expressive language. When I was working in Switzerland my boss was a PROLOG guru. He could knock out a PROLOG program (with GUI interface) in an hour or so that would have taken me a week to code in C++.
On the other hand, I think I could have coded the same application in APL in a few hours, so maybe you'd like APL. The A+ implementation is available as an RPM in the Fedora repositories, and probably available for other distributions.
Last edited by PTrenholme; 02-15-2008 at 08:11 AM.
As for the other question: I don't work as a programmer, but I make scripts quite often just to help me manage my system(s) here. Sometimes these scripts are very slow tho, so I code some parts of the script in C, then run that from within the script to speed it up, like when I have to nest loops for some reason (it's rare).
Since you are concerned with speed, do you spend more of your time with algorithms, endless conditional trees (if, else, case, etc.,) or dealing with abstract objects?
ta0kira
If you can get your mind around the PROLOG paradigm it can be a very powerful and expressive language. When I was working in Switzerland my boss was a PROLOG guru. He could knock out a PROLOG program (with GUI interface) in an hour or so that would have taken me a week to code in C++.
On the other hand, I think I could have coded the same application in APL in a few hours, so maybe you'd like APL. The A+ implementation is available as an RPM in the Fedora repositories, and probably available for other distributions.
I'll definitely look into prolog, I think it's under a whole subset of languages used for 'logical' programming.
Quote:
Originally Posted by ta0kira
Since you are concerned with speed, do you spend more of your time with algorithms, endless conditional trees (if, else, case, etc.,) or dealing with abstract objects?
ta0kira
Well, now that I think about it, it's mostly conditional trees that take a lot of time. I don't usually deal with objects or OOP too much because the programs I write are not very large, usually around 1000-3000 lines (in pretty much any language). I do deal with OOP when using python tho, because I have to.
The nice thing about C is that what one person does you don't have to do. There are a lot of styles out there, but there are (somewhat) non-painful ways to use C. The C you might be used to may be just huge, ugly procedures shoved into single functions. If you separate everything into small, concise functions then it can be a lot less of a headache. Conditionals are a pain in the ass to keep track of when they're jammed in with all of the operational code. If you take each action required and make it it's own function (to include sub-actions,) then use separate functions for the conditional comparisons (also broken down by "specialty") then C can be very easy to maintain. C++ has the benefit of the same, with the addition of string and list classes so that you don't have to allocate and deallocate something as simple as text.
ta0kira
So why no to Perl? The only thing I'll say about 'easy to learn' - some ppl find perl hard to learn because there are so many ways to do things, and so many short cuts.
FYI - there are quite a few games built in Python... Eve-Online would be a good example.
The nice thing about C is that what one person does you don't have to do. There are a lot of styles out there, but there are (somewhat) non-painful ways to use C. The C you might be used to may be just huge, ugly procedures shoved into single functions. If you separate everything into small, concise functions then it can be a lot less of a headache. Conditionals are a pain in the ass to keep track of when they're jammed in with all of the operational code. If you take each action required and make it it's own function (to include sub-actions,) then use separate functions for the conditional comparisons (also broken down by "specialty") then C can be very easy to maintain. C++ has the benefit of the same, with the addition of string and list classes so that you don't have to allocate and deallocate something as simple as text.
ta0kira
I think you might be onto something. It's true that I don't really have a style, or really have been taught any. I'll definitely try this. Is there any place that describes how to code C with a certain style. I have some textbooks on C, but they don't mention too much on style (just the basic stuff: don't write everything on one line, where to put brackets, spacing, etc.).
It seems that I need to program a hell of a lot in order to develop a good style. Maybe there's an easier way.
Thanks for the other comments too.
(COBOL sends chills down my spine ... but thanks for suggestion)
Honestly, I've never read a programming book. Everything I've learned is from message boards, internet searches, man/info pages, and of course endless experimentation and hacking of other programs. I learned just enough to experiment on my own, then picked things up as I needed them for something I was doing. No one really knows what your requirements are, so most references will give you 30% what you want and 70% what you don't want (academic books are the worst.) If you learn basic C then we can help you with style here.
ta0kira
Honestly, I've never read a programming book. Everything I've learned is from message boards, internet searches, man/info pages, and of course endless experimentation and hacking of other programs. I learned just enough to experiment on my own, then picked things up as I needed them for something I was doing.
Hmmm ... I've never thought of it that way, but then that's the way I learned everything I know about Linux. Looks like that's what I'll have to do with C too. Anyway, thanks for your comments, they are helpful and thought provoking.
Quote:
Originally Posted by UMG:Chicken_Soüp
Hire a programmer. Send them emails with specs.
Lol, yes take the easy way out. I've found the easy way out never pays, it costs.
... The C you might be used to may be just huge, ugly procedures shoved into single functions. If you separate everything into small, concise functions then it can be a lot less of a headache. Conditionals are a pain in the ass to keep track of when they're jammed in with all of the operational code. ...
ta0kira
I don't disagree, but I think this is less a property of the language and more of the technique of programming in general.
In my days at the University, I knew of one physics researcher who used COBOL to handle the data reduction of satellite data because the facilities in COBOL were so good at describing and manipulating data.
In regard to the original question, I see only one of the criteria as objective and measurable -- performance. The readability and ease of learning are in the eyes of the beholder. For the performance, you may be interested in the information available at http://shootout.alioth.debian.org/ which looks at about 20 benchmark codes in 40 or so languages.
“What, then, is the proper dharma path?” asked Nubi.
The master spoke:
“When the eagle flies, does it forget that its feet have touched the ground? When the tiger lands upon its prey, does it forget its moment in the air? Three pounds of VAX!”
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.