Click to See Complete Forum and Search --> : Best cross-paltform language?
flintstone
02-22-2001, 07:31 AM
I expect a lot of opinions on this, so please don't hide your fire under a bush!
I am looking to learn a language (I can't think of a better use for my linux box), but don't really know which one should I tackle first. I am biased towards C, Python and Perl. Are these the best ones for a newbie programmer?
I should add that I am not looking to save the world or earn my living thru coding, I just want to have fun with my linux.
Also, I am going crazy trying to learn emacs commands. Do I need a strapon brain or just lots of practice? I think its pretty cool to write programs in..now if I can know how to rename my files...
TIA :)
MrNewbie
02-22-2001, 09:02 AM
C is cross-platform if you stick to ANSI standards, though no one does, heh, its also extremely hard to learn, I found anyway, I havent done python but I think it was designed as a "learning" language, so that would probably be a good place to start, perl is also way easier than C and from the very little of it I've done I love it. My favourite language is still C but perl is just easier.
[ 22 February 2001: Message edited by: MrNewbie ]
Stuka
02-22-2001, 11:17 AM
Of the 3 you mentioned, python and perl are the better cross-platform choices. Both are interpreted, and both have interpreters for a large number of OS's. C is not really cross-platform, as any system calls you do are going to be VERY platform dependent. Disk, file, and hardware access are going to change in some ways, no matter what. Python is an object-oriented language, while perl is a procedural language. How that affects your decision making is entirely personal. I personally prefer the OO programming paradigm, while others like procedural thinking. Take your pick. Oh, I know very little about python from a hands-on perspective, but it is supposed to be a learning language. Perl is also fairly easy to learn IMO. So just pick one and have fun!
Also, I am going crazy trying to learn emacs commands. Do I need a strapon brain or just lots of practice?
What you need is vim. :)
Oh; and I'd say Java, just to be different. (Though I haven't experienced python yet.)
jemfinch
02-22-2001, 12:02 PM
First, for a newbie, python is far easier to learn than perl.
In addition, python does an excellent job of separating os-specific parts of the language to a module, so you can be sure your program is cross platform without actually having to test it. Perl, on the other hand, has tons of *nix stuff in the main language, making it a bit harder to assure yourself of the cross platform nature of your code.
Also, python simply runs (well) on more platforms than perl does.
Jeremy
I started programming with Perl. I've heard that it's harder to learn than Java than a friend who has tried both. I don't particularly agree with him but that's okay.
I found Perl pretty easy to learn with and since it's loosely based on C, alot of the same concepts(different names usually) apply. Also, now I'm learning Java, and having good Perl experience is helping with that.
Hope that helps :D
Dru Lee Parsec
02-22-2001, 12:55 PM
For the sake of saving time please refer to any of my pro-Java evangelical postings. You can find them on any of the weekly "What language should I learn" post.
flintstone
02-22-2001, 02:00 PM
Originally posted by jemfinch:
In case I failed to mention it this post, Python is the coolest language
Jeremy
you did.
Can I expect you to reccommend any other? :D
lazy_cod3R
02-22-2001, 05:59 PM
stuka :
you know how u said python is object oriented whilst perl is procedural, i thought perl was also object oriented. I just think objects in perl are a bit weird by the way you define them but other then that you can also use perl to be an 00 language if you really wanted to couldnt you ?
Energon
02-22-2001, 06:05 PM
Originally posted by Flintstone:
now if I can know how to rename my files...
mv orig_name new_name
ie:
mv myfile.cpp mynewfile.cpp
mv = move, and moving a file to a place w/ a new name, is renaming it... :)
Originally posted by lazy_c0d3r:
you know how u said python is object oriented whilst perl is procedural, i thought perl was also object oriented. I just think objects in perl are a bit weird by the way you define them but other then that you can also use perl to be an 00 language if you really wanted to couldnt you ?
You are right. Perl can be extremely object-oriented. Many of its Extensions make use of constructors, object pointers and alot of other OO techniques. Learning Java(which is definitely Object-Oriented), I have been likening a lot Java syntax to its counter-part in Perl, just make things easier to understand.
jemfinch
02-22-2001, 06:35 PM
The difference between python and perl as far as OOP goes is that while python was designed with OOP in mind, in perl it was tacked on much later. Hence, the syntax and usefulness is much cleaner in python than in perl.
Heck, perl didn't even have loadable modules until version 5.
Jeremy
Stuka
02-22-2001, 06:52 PM
Perl, IMO, is not an object-oriented language. Yes, there are objects in it, and yes, they work like objects in other OO languages. However, as Jeremy mentioned, the OO parts were added much later, and are not all that clean. Since I don't know python, I can't comment on it, but other OO languages, such as Java, show it throughout. For example, ask TLD how to do OO programming in perl - I'm not sure if he knows how, or even if he wants to. Now ask nanode or DLP how to write procedural code in Java - and prepare for a laugh.
flintstone
02-23-2001, 12:14 AM
Perhaps the density of my brain has increased a thousand-fold and is unable to abosrb new stuff..but for me this debate about oo vs procedural langauges sounds too much like win vs linux?
hwo would it really matter if a language is oo or procedural? as far as i am concerned it should be intuitive, easy to learn and be efficient at doing what i want.
if oo languages do all this, then the procedural days are numbered (except for the need to maintain legacy code)..otherwise dont you think its just a flavor of the month?
shouldn't a language be judged by its benefits rather than its features or quirks??
flintstone
02-23-2001, 12:31 AM
my apologies for spamming the topic. the damn connection hung up on me and i had to refresh it :o
btw, does anyone know a good website where i can find lots of problems related to programming?
Stuka
02-23-2001, 01:37 AM
Actually the OO v. Procedural debate is not really like Win v. Linux. I really think both styles have their place. I like to code in OO style personally, but not everyone shares this opinion. Yes, choose the language and/or paradigm you prefer. Go forth, code, and have fun! :)
flintstone
02-23-2001, 03:54 AM
True, the language opinions are not as fanatically held as OS views ;) ; but my point is that ultimately the tool(OS/language) has to be matched with the job and not vice versa. In my case, I am looking for a language which will help me do fun stuff with my linuxbox, mainatin it easily, help me get more insight into linux internals and generally keep a clean desktop.
I have just started hacking Learning Perl and I think its quite intuitive (except forthe regexs ofcourse), whatever I have seen of Python sample codes seem to be based on the same premise.
My opinion is that a good OS or langauge is like the best English butlers (Jeeves, anyone?): helpful, discreet and highly resourceful and efficient :)
Thank you all for the posts.
jemfinch
02-23-2001, 09:09 AM
Originally posted by Flintstone:
True, the language opinions are not as fanatically held as OS views ;)
Hey, speak for yourself, buddy!
I like to think that my language opinions are far more fanatically held than my OS views.
:D
Jeremy
nanode
02-23-2001, 11:42 AM
Quite often software is judged based on the language it was written in - often rightly so.
Some people like gnome just because it's in C (GTK) and others KDE because of c++ (qt). That might sound silly to *nix newbies, but it's certainly not unheard of.
I've also met numerous people who dislike java because it requires a JVM to run apps. I won't go there in this thread :)
flintstone
02-23-2001, 01:47 PM
Hey, speak for yourself, buddy!
I like to think that my language opinions are far more fanatically held than my OS views.
:rolleyes:
:cool:
flintstone
02-23-2001, 03:49 PM
nope, it wasn't working when I checked last; but then it was a while ago..so maybe the world has moved on.
on a related topic, I've noticed that my rating nosedives when I spam my own topics or post a particularly dumb opinion.
mere coincidence ? or a conspiracy?
:confused:
sincka
02-24-2001, 01:26 AM
I know I'm a little late but hey...
C/C++ :cool:
I am learning C++ right now (also my first language), it is pretty easy once you get into it. At the beginning it is a little hard to understand but then... :)
sincka
02-24-2001, 01:28 AM
Actually nm. I forgot that we were talking about best cross-platfrom language.
But C/C++ I find really kewl :)
Tyr-7BE
02-24-2001, 03:45 AM
I am also late, but here's my 0.02 and my programming history.
I learned C++ through a course, and that gave me a very good foundation. I am currently learning Java, and I find that in many cases, the syntax is identical. Almost every element of Java has a C++ counterpart. Java is a good language to learn because it will provide a strong foundation when moving on to more complex languages like C++...all one needs to do is familiarize themselves with the declaration-definition hoo-ha, and learn some of the more complex features C++ has to offer. Syntax background in Java can make a world of difference here. From C++, it's easy to learn C. Hell...I know a fairly large chunk of C just from programming in C++. It's for these reasons that I think Java is a good language to start learning.
I myself have never programmed in Perl. I hear that Python is a beautiful language, and I fully intend to learn the both of them once I become comfortable with Java (fast approaching...if you know C++, you almost know Java).
Granted, Java has some runtime issues, and as far as actual things you can do with the language, it's damn limited. However, it's wonderful for simple tasks, platform-independent work, looking pretty, and introducing people to and OOP model (I believe it's one of the few pure OOP models in existence). Go for Java...it's no C++, but it's a hell of a lot easier to learn :)
flintstone
02-24-2001, 05:17 AM
Its really great to get so much information on a rather "mundane" question. Anyway, I think most of the people here unanimous as far as python is concerned.
I've decided that to start with perl & python (though I cant get hold of a single book on python is this one-horse town) and then get into the ring with bruisers like C.
nanode
02-24-2001, 11:53 AM
I've heard that even the few Python books out there, few are decent. Until Rasmus writes the Python Bible, start with the online tutorials:
http://python.org/doc/current/tut/tut.html
Originally posted by Flintstone:
nope, it wasn't working when I checked last; but then it was a while ago..so maybe the world has moved on.
on a related topic, I've noticed that my rating nosedives when I spam my own topics or post a particularly dumb opinion.
mere coincidence ? or a conspiracy?
:confused:
You'll notice the post you're replying to has been deleted. Find the icon at the top of a post w/ the pen and paper, and the tooltip will say "Edit/Delete Post". Click that, and find the checkbox marked "Delete This Post". Check that, then click the "Edit Post" button.
I'm not trying to be an *******, or harp on anything, just being informative for future reference. I'm sure you'd rather fix a double post than post again to apologize for it. right?
About the ratings, I don't know; you can always click the link to see how many people have voted on you.
flintstone
02-24-2001, 01:07 PM
oh, I was kidding abt the ratings :D
But by god you are right abt duplicate posts.
Thanks for the headsup kmj
[ 24 February 2001: Message edited by: Flintstone ]