LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

View Poll Results: The best languages?
PHP 23 18.40%
Perl 33 26.40%
Python 43 34.40%
Ruby 13 10.40%
C 86 68.80%
C++ 53 42.40%
Java 37 29.60%
Lisp 14 11.20%
Erlang 4 3.20%
Smalltalk 4 3.20%
Haskell 9 7.20%
C# 10 8.00%
Lua 6 4.80%
COBOL 3 2.40%
Scheme 6 4.80%
Go 1 0.80%
Groovy 2 1.60%
Fortran 10 8.00%
R 6 4.80%
Multiple Choice Poll. Voters: 125. You may not vote on this poll

Reply
 
LinkBack Search this Thread
Old 06-15-2010, 04:21 PM   #16
hda7
Member
 
Registered: May 2009
Distribution: Debian wheezy
Posts: 244

Rep: Reputation: 31

I voted C, Perl, Python and Scheme. I use Perl for a lot of stuff, from processing text to writing a Gopher server. Python is my favorite cross-platform OOP language. I actually like it better than Java. And Scheme just gives you a whole new perspective on programming. I've learned (or at least looked at) a lot of different languages, but these are my favorites.
 
1 members found this post helpful.
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 06-16-2010, 04:21 AM   #17
fruttenboel
Member
 
Registered: Jul 2008
Posts: 270

Rep: Reputation: 48
Quote:
Originally Posted by Sergei Steshenko View Post
No, TCL is not a good language because it is an interpreter. I.e. to catch all syntax errors one needs a static checker.

Perl/Python/Java/Ruby are different - they first compile.
The same applies to PHP which is on top of the list.

Still, Tcl/Tk is great for small applications like GUI front ends. Better than any Qt based system. C is famous for the runtime errors (array bounds and dangling pointers, notably) yet this IS a compiler. And it is clearly outperformed by Tcl here,
 
Old 06-16-2010, 08:10 AM   #18
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
I voted for C and Python.

C teaches you about the low-level workings of a computer, and it is vary commonly used.

Python because it's easy, versatile, and object-oriented.
 
Old 06-16-2010, 08:41 AM   #19
ronlau9
Senior Member
 
Registered: Dec 2007
Location: In front of my LINUX OR MAC BOX
Distribution: Mandriva 2009 X86_64 suse 11.3 X86_64 Centos X86_64 Debian X86_64 Linux MInt 86_64 OS X
Posts: 2,369

Rep: Reputation: Disabled
Oke I am a grumpy old man .
And English is not my native language
So forgive I am not totally clear .
But why are people to day so worried about which programming language they should learn .
Instead of how do I learn to make a correct program .
Making program which is mathematical correct is art in it self.
Doing so has nothing to do which the language you use .
The language you are going to use only depends in which field are going to work .
In my case I had work in the commercial field .
So I am most familiar with VAX COBOL and IBM COBOL .
And for fun I have learn PASCAL ands FORTRAN
 
2 members found this post helpful.
Old 06-16-2010, 08:44 AM   #20
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,242
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
From top to bottom:

C + C++ + *ASM
Java
Ruby
Perl
PHP
Awk + Sed + *Grep
Bash/Zsh

Last edited by konsolebox; 07-01-2010 at 01:47 AM. Reason: Perl should be higher than PHP
 
2 members found this post helpful.
Old 06-16-2010, 12:25 PM   #21
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 451Reputation: 451Reputation: 451Reputation: 451Reputation: 451
Quote:
Originally Posted by fruttenboel View Post
The same applies to PHP which is on top of the list.

Still, Tcl/Tk is great for small applications like GUI front ends. Better than any Qt based system. C is famous for the runtime errors (array bounds and dangling pointers, notably) yet this IS a compiler. And it is clearly outperformed by Tcl here,
I was talking about syntax errors.
 
1 members found this post helpful.
Old 06-17-2010, 04:34 AM   #22
fruttenboel
Member
 
Registered: Jul 2008
Posts: 270

Rep: Reputation: 48
Quote:
Originally Posted by Sergei Steshenko View Post
I was talking about syntax errors.
So am I. Tcl catches syntax errors at compile time.

With Tcl, the full source is checked when you run it the first time

Code:
jan@nitrogen:~/develop/tcl$ tst.tcl
Error in startup script: invalid command name "puck"
    while executing
"puck .frame4"
    (file "./tst.tcl" line 32)
jan@nitrogen:~/develop/tcl$
Consider the test run as a compiler run. This error was in the very last line of the source. Not bad for an interpreter. BASIC would have found it much later. As RonLau said: the language is a problem specific tool. Use the one you need for that task. Concentrate on the algorithm and make a working program.

For the things that I do with Tcl, it's a mighty fine language. For general programming nothing beats Modula-2.
 
Old 06-24-2010, 11:17 PM   #23
pr_deltoid
Member
 
Registered: Jun 2010
Distribution: Fedora
Posts: 289

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by bigearsbilly View Post
shell
perl
C/C++

with this combination you can do just about anything.
I'm learning shell, Python, C/C++ (only C really, anytime soon... but I've read a couple of books on C++ anyways.) Very close to my list.
I don't have any problems with Perl, and in fact before I decided to stick with Python I was going to stick with Perl. But I decided that Python is the language I'd rather stick with in the long-term... maybe not a great decision in some ways, but to me it seems like a great decision for me. I just generally like Python.

Last edited by pr_deltoid; 06-24-2010 at 11:29 PM.
 
Old 06-25-2010, 07:45 AM   #24
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: FreeBSD, Debian, Mint, Puppy
Posts: 3,269

Rep: Reputation: 165Reputation: 165
I never got round to python, though i have all the books.
I work a lot in perl so that's why.

perl is fast which is important to me.

I started life as a C programmer but now I
much prefer C++.
It's much harder work using C.

don't forget to try lisp one day too.
 
Old 06-25-2010, 07:44 PM   #25
robotsari
LQ Newbie
 
Registered: Jun 2010
Location: boston & sf bay, depending on the day
Distribution: ubuntu, rhel, debian
Posts: 20

Rep: Reputation: 1
I really want to say Scheme (or any Lisp dialect), because whilst I haven't ever used it outside of a very strict learning/teaching/research environment, it taught me a great deal about the structure and interpretation of computer programs.

Funny... that's the name of the book... http://mitpress.mit.edu/sicp/ You can get a full copy of the text & some assignments here, and even Sussman & Abelson's fun lectures here: http://groups.csail.mit.edu/mac/clas...sman-lectures/

I learned Scheme from these guys and loved it, it convinced me to drop my biochemistry research and run over to be a computer scientist. It's beautiful and pretty, and really challenging - it taught me programming is full of fun puzzles and gave me a really intuitive and useful introduction to algorithms without even being too explicit about it.

But as I said, I now never use the language. I teach introductory programming classes at the college level and my language of choice is always Python. I think it is much easier to teach and understand at any level (Scheme is harder, imho, as a first language unless you are also good at the sorts of discrete mathematics that underlies so much of theoretical computer science). Python can be taught without having to delve into complex issues of typing, syntax, compiling, etc. You can write your first .py script in a matter of seconds, it has an *interpreter* (excellent for beginners), and as you get better you can delve into more complex ideas such as classes.

At work I use bash scripting and C exclusively. I think learning Python is a good choice if you're a total beginner and want to quickly learn about programming; Scheme is good if you're mathematically inclined and are really interested in the design of programs from the bottom-up; and C is best if you want to get a job or hack on OS design. Once you know C many other languages quickly follow - C++ & Java come to mind. Perl follows nicely from Python; I wouldn't have been able to learn Perl without my Python knowledge as just a beginner.

Finally, OCaml and Erlang are my favourite languages for how pretty they are but I'm not sure I'd recommend them to a beginner!! (:
 
Old 06-25-2010, 07:55 PM   #26
robotsari
LQ Newbie
 
Registered: Jun 2010
Location: boston & sf bay, depending on the day
Distribution: ubuntu, rhel, debian
Posts: 20

Rep: Reputation: 1
Quote:
Originally Posted by Sergei Steshenko View Post
No, TCL is not a good language because it is an interpreter. I.e. to catch all syntax errors one needs a static checker.

Perl/Python/Java/Ruby are different - they first compile.
Umm... what? Python is an interpreted language, NOT a compiled one. I think you are abusing the notation of "compiled" versus "interpreted" here. From http://pentangle.net/python/report/node7.html :

Quote:
By interpreted it is meant each time a program is run the interpreter checks through the code for errors and the interprets the instructions into machine-readable ``bytecode''.
Perl & Python are interpreted languages. We know this in part because you can *run an interpreter in the shell to interactively enter code*. Also because running a Python/Perl script takes but one step: $ (python|perl) script.(py|pl) --- the interpreter reads through things line by line and is why running this code:

Code:
print f1(5)

def f1(x):
   return x + 9
returns an error - interpreted code scans line-by-line so definitions MUST appear BEFORE a call.

Java is compiled (contentious, but I believe it is because you must run the *java compiler* to *compile your code* before you run it). I'm not sure about Ruby, I've never used it.
 
1 members found this post helpful.
Old 06-25-2010, 07:58 PM   #27
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
I also haven't used Ruby much, but it's interpreted and has an interactive prompt just like Python.
 
Old 06-25-2010, 08:07 PM   #28
Telengard
Member
 
Registered: Apr 2007
Location: USA
Distribution: Kubuntu 8.04
Posts: 579
Blog Entries: 8

Rep: Reputation: 147Reputation: 147
Exclamation

Quote:
Originally Posted by fruttenboel View Post
I'd say: Tcl/Tk and Java. Both are scripted languages.
In the name of all that is holy, Java is not a scripted language! Java programs are compiled, like C programs. Unlike C, the Java compiler emits byte code suitable for execution in the Java Virtual Machine.

http://en.wikipedia.org/wiki/Java_(programming_language)

BTW, I voted for C and Java. If I had chosen a third it would have been Python, but two seemed like enough. Anyway, once you get a grip on C you can learn most any other modern language much easier.
 
Old 06-26-2010, 02:34 AM   #29
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 451Reputation: 451Reputation: 451Reputation: 451Reputation: 451
Quote:
Originally Posted by robotsari View Post
...
Perl & Python are interpreted languages. We know this in part because
...
No, Perl isn't an interpreted language. It first compiles into a tree, reading all the code, and then executes that three.

FYI: http://perldoc.perl.org/B/Deparse.html .
 
Old 06-26-2010, 03:09 AM   #30
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266
Quote:
Originally Posted by robotsari View Post
Umm... what? Python is an interpreted language, NOT a compiled one.
Actually, that's not 100 % true. All of those languages are compiled to byte-code before they are run. A purely interpreted language / scripting language like bash is read line by line with no compilation to byte-code.
 
  


Reply

Tags
c++, compiler, java, language, programming


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What programming language, languages to learn for linux. gimmee Programming 11 11-28-2006 07:30 PM
good programming languages to learn qennster Programming 13 05-22-2001 10:12 AM


All times are GMT -5. The time now is 05:08 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration