Pros and Cons of Different Languages

Member
Posts: 254
Joined: 2005.10
Post: #1
I thought it might be interesting to hear everyone's opinions on different languages. What you like and hate, what you think certain languages are good for, etc.

Me first!

C: C is great because is has the basics that you need to do almost anything and its easy to build up to more complex programs. (For example, defining your own objects through C) Unfortunately C suffers from only having the basics, and it's sometimes a hassle to define a bunch of extra things when another language provides them.

C++: I like C++ because it has predefined several useful concepts and it makes integrating new datatypes directly into the language easy. That way your new code can look as if it was provided natively. Unfortunately many people abuse this functionality and you can easily shoot yourself in the foot with some of C++'s features.

Python: Easy to pick up and use, plus it has a lot of nice libraries. I hate it's object system though; it just feels too much like C to me. I haven't done any large projects in Python yet.

PHP: Easy to understand if you know C/C++ and I like the object system provided by PHP 5. It fast to pick up and to code in, but it can be tough to debug. Also, there are a lot of nice libraries for PHP. On the downside, the language is really only for web-apps and not anything else.

Ruby: I love the syntax of Ruby, and I love that all operations are message-sends so its easy to override operations on your own custom objects. I haven't done a large project in Ruby yet so I don't know about its downsides but as with Objective-C I'm certain speed can be an issue.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
C: A necessary evil. I hope eventually it'll be replaced by a sane low-level language, but it does its job well enough for now.

C++: An unnecessary evil. It doesn't help you write high-performance code, it doesn't help you write code fast, it doesn't help you write correct code. No benefits here.

ObjC: A weird kind of a compromise. Particularly with garbage collection, it does help you write code fast, and it does let you write high-performance code (being a strict superset of C), but it doesn't help you write correct code.

Python: An unfortunate mess. It started out as a beautiful, clean language, and it's really not any more. The language is inconsistent with recent additions, and the libraries are a mess. Still, it's better than many.

Ruby: A fortunate mess. It was never supposed to be beautiful, or clean, but it has a nice theoretical foundation. Amusingly, despite the lack of consistency within the language, the libraries tend to be better than Python's. My language of choice at the moment.

Lua: Easy to secure when embedded. That's about it.

Bash: yuck.

Make: double yuck.

PHP: quite possibly the worst language ever. Yes, I'm including Brainfuck, Malbolge, and Whitespace in that comparison.

LISP: I can't help feeling that there's something here, but Lots of Irrelevant Silly Parentheses make it unnecessarily hard to read.

Dylan: the-most-verbose-language-ever with THE-HARDEST-CONSTANTS-TO-TYPE-EVER and the slowest compiler ever. Lots of good ideas here I think, but the implementation (d2c, I haven't tried the other) is atrocious.

Haskell: Probably theoretically the best language on my list, but it sure takes a bit of getting used to. Speed within an order of magnitude of C, safety about as good as it gets in practice, and code volumes somewhere near ruby, meaning it should be easy to code in... one I'd really like to get to know better.

Java 1.4: In a lot of ways, what Python should have been. Relatively simple, clean. Good performance, reasonable safety, fantastic tool support (Eclipse).

Java 1.5: A sad future for Java.

C#: It could have been a better Java, in a lot of ways it's a better C++.

Ones I don't know but really should: SmallTalk, Self, JavaScript, OCaML, Erlang... more?
Quote this message in a reply
Moderator
Posts: 679
Joined: 2002.11
Post: #3
BLITZMAX!!!

(not)

Seriously, though, if its various constructs were more like Java instead of BASIC, it would be nice. Wonderful libs for 2D games, but that's about it.

OSC summed up the rest of them nicely.

My web site - Games, music, Python stuff
Quote this message in a reply
DesertPenguin
Unregistered
 
Post: #4
Well I am sure others will disagree...but here are my opinions...

Ruby - I love this language. It is the funnest development I have ever done. Clear, Concise, Flexible....Only downside is I would not use it for games or performance-critical development. If you are doing web development, then do it in RoR. No question.

C++ - As sick as this sounds...I like c++... Complex, powerful, confusing...Bjarne is my idol. I have spent a lot of time learning this language over the years. ;-)

Java - Java is ... ok. It was my primary work language. I am even a Sun Certified Programmer. ;-) But I never really liked it as much as c++ or ruby.

C - C is the defacto low-level standard. But I miss objects when I use it.

Objective-C - Actually, I rather like it .. and cocoa. If I had more time, I would spend it here.

Assembly - Clearly, no serious app coding here ....but for learning...for really learning ....Assembly helps you understand the processor. Things like stack frames, registers, memory, GDT, LDT, CPL... Nothing helps you more.

Lua - Great for embedding....

C# - Not bad from a strictly academic standpoint. But it comes from MS. Enough said. I used MFC. Not investing in them anymore. Enough said.

Delphi/Pascal - Pascal was a good learning language.

Python, Perl, Haskell, Erlang - Don't know enough yet
Quote this message in a reply
Moderator
Posts: 370
Joined: 2006.08
Post: #5
C: a language good at doing *anything*, essentially. The fact that it's procedural has its pros and cons, but I love the fundamental way that the language is designed to work.

C++: a nice language because of its objects, but the STL is really not all its cracked up to be; I tend to view C++ as more of an extension of C than a seperate language, probably because I prefer keeping things as C like as possible when using C++.

Objective-C: the brief encounter that I had with the language left a good impression. I'm sure I'll form more opinions when I start coding more in-depth interfaces.

Java (1.5): a horrible, horrible language. The "write once run anywhere" was a good idea, but bad in practice (or at least Java's implimentation of it was bad).

PHP: one of my favoriate languages...as long as you're not trying to do anything too complex with it. My only complaint would be that it doesn't play nice with Javascript, although there are ways around that.

J a pretty decent language in of itself, its mostly the multitude of different browsers that have bad implimentations of it that make it annoying. The fact that its not multi-threaded shows through in places. The lack of controlled scoping gets annoying very quickly, and the fact that almost no two browsers will ever treat a line of javascript the same makes for very tedious development.

HTML: although not considered a language by some, I think it's a great way for people to get their hands dirty "programming" something because it illustrates many of the fundamentals. This language does what its supposed to do, and not much else.

Personally, when doing application development, I use a hybrid C/C++ approach. I use C++ for its classes, member functions, constructors and destructors, and new and delete; however, that's it. You're much better off going with an entire different approach then using one of the premade STL classes. cout is useful for debugging, and that's about else. Using those ^^ features of C++ with a mix of C can be a very powerful approach Smile
-wyrmmage

Worlds at War (Current Project) - http://www.awkward-games.com/forum/
Quote this message in a reply
Member
Posts: 257
Joined: 2004.06
Post: #6
C++: It's my primary language since it's what I use at work the majority of the time and on my own projects as well.

Java: I hate, hate, hate this language with a burning passion. It's currently the bane of my work day since I'm using it right now for work. Of course, I probably wouldn't hate it so bad if I didn't have to work with it on a cell phone. Sheesh! How Java ended up on cell phones I will never figure out.

Obj-C: I rather like this language as well. It helps me get projects up and running quickly and I can make things look nice with a minimum of fuss. Since my day job is spent making video games of some sort or another, I don't have a lot of time to spend working on my own personal projects so I have to use something that lets me work fast.

Everything else I've dabbled in here and there but I don't do anything serious with them. I've been thinking of using PyGame to do some of my latest projects so I can get the cross-platform capabilities but then I'd lose some of the nicer UI stuff that I get for free using Cocoa.

The brains and fingers behind Malarkey Software (plus caretaker of the world's two brattiest felines).
Quote this message in a reply
Moderator
Posts: 3,570
Joined: 2003.06
Post: #7
Obj-C: The best language ever! Seriously, the more I use it the more I love it and the less I like other languages. It has invaded my brain!

[edit] I should add that there is ONE thing that I can complain about with Obj-C: It doesn't let you hide instance variables very easily. Not that one really has to hide instance variables, but why not? [/edit]

C: C is like Rome: All roads lead to C. I doubt I will see it replaced in my lifetime. It was my favorite language up until just a few months ago when Obj-C took over decisively. I've programmed in C for like... ever. More than fifteen years I think.

C#: If it didn't run exclusively through a virtual machine, C# could quite possibly be my favorite language... Well, maybe that's stretching it a bit, but I really do like it a lot!

Java: Java's dead as far as I'm concerned. It was a great idea for a while though, and I played with it and I liked it at the time. C# eats Java's lunch now.

C++: I've said this before and I'll say it again: I don't hate C++ but I can't/won't work with it. I've seen way too much bad C++ to say anything good about it. There are some sick, twisted freaks out there that have written nightmares with this language. I protest!

Lua: Lua's alright. Lua's okay. Lua's easy. Lua's small. It's Lua.
Quote this message in a reply
Moderator
Posts: 608
Joined: 2002.04
Post: #8
C : Good for its time and purpose but I wouldn't want to write anything large in it.

C++ : My least favorite language. It's C with a messed-up idea of object-oriented programming thrown on for ugliness-sake. Again, I wouldn't want to write anything large in it.

C# : What C++ should have been.

Objective-C : Much better than C++. It's quirky syntax and obsession with @ is a little annoying at times, but I love love love the pass-by-name method parameters. Objective-C 2.0 sounds nice, especially the garbage collection part. If Xcode would be anything like Eclipse (heck, I'd just be happy with something resembling refactoring) I think I'd like it more.

Java : Nice. A decent substitute for Objective-C for cross-platform projects. Not a big fan of the whole VM thing though. Packages are nice. And it'd be nice if Apple would actually release SE 6, though I guess that won't happen until Leopard now. And Eclipse is my best friend.

Ruby : The more I use it, the less I think I like it. It's nice for small, quick projects but I'm not sure I'd like to use it in a big project. It seems to enjoy being different for the sake of being different. Rails is nice.

Lisp : Interesting. Brain-warping. A bit painful at times but it improved my ability to write recursive code.

PHP : I'd liken it to C/C++. It was C before PHP 5, and now post-PHP 5 it's C++. Ugly and unnecessarily complex with a weird idea of object-oriented design hacked on to make it more ugly. It has its place, but I wouldn't want to use it for something very big.
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #9
My journey goes a something like this:

Basic, HyperCard and Pascal: Ah, back in the day... No longer relevant though.

C: C's not so bad. It's not terribly powerful, but it's fairly simple and sufficiently low level when you need to do the occasional odd job. C99 is pretty bearable.

C++: Too complicated. I really wanted to believe that C++ was a better C, but it's just doesn't seem worth it.

Scheme: I really liked Scheme, though I only used it academically. Most of the cool things that you can do in scheme can also be done in Ruby, just not always as elegantly. Though as always ... the parenthesis, ugh.

Java: Ugh, I really don't like Java. They've taken away almost every useful feature I like in other languages. More often than not, the reasoning is that because dumb people can use them to write bad code, they shouldn't exist at all. The syntax is pretty much C++ with many of the warts and few of the features. Syntax aside, Java has become nearly as complicated. In general it seems to encourage writing overly verbose code and jumping through a lot of hoops just to do simple things. Don't even get me started on the standard collection classes.

Python: Python seems Ok. Doesn't seem very consistent though. I discovered Ruby at about the same time and liked that better because it seemed like a slightly better, more consistent Python.

Ruby: I love Ruby (for the most part). Clean and concise syntax, blocks, modules, the object model is great, the standard types are great, high level of abstraction, consistent (mostly), I could go on... Ruby is simply a fun language for me. It's also the slowest language I've ever used, though as often as not it doesn't really matter. Writing C extensions is pretty easy (but poorly documented). The biggest problem with Ruby is that there are some rather annoying inconsistencies that keep things like metaprogramming or duck typing from working as well it could. Wow, and don't look at the C implementation (Ah my eyes!).

OCaml: Some really cool features such as argument pattern matching and type inference. It's very strongly typed, but because of the type inference, you don't need the redundancy of specifying all types by hand. (Do you die a little inside whenever you have to type ArrayList<Integer> numbers = new ArrayList<Integer>() ) The syntax is very readable, and fairly concise. I hear it's a lot like Haskell (which I've never tried).

PHP: ... It's like C but worse... Amazingly inconsistent from what I've seen.

J There are a lot of brain-dead decisions IMO, the way it handles type casting has got to be the top. The object model is somewhat interesting, but that's about it. The fact that the only thing it really seems good at is making browsers slightly incompatible puts a bad taste in my mouth.

Obj-C: I'm a relative newcomer to Obj-C. It seems nice, but has many of C's warts.

Io: This language keeps tempting me to leave the the cult of Ruby, but it just doesn't seem ready for prime time yet. The object model is quite simple yet really powerful. The syntax is nearly as simple as Scheme's (don't worry, no parenthesis), but sadly not very concise because of it. Documentation is often non-existant or worse, hopelessly out of date. The C implementation is just about as immaculate as you can get in C. (which is good given that there is little documentation)

Oh. I forgot to add SQL! Worst functional language ever. Though I don't know of any viable competitors.

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Moderator
Posts: 508
Joined: 2002.09
Post: #10
I'll only talk about web languages since the other languages have been described quite well:

J on its own a very powerful language to add some interactivity to you web-based applications. It doesn't allow to do the same things as PHP, but it can work well with it. It's sad and tormenting how several browsers interpret the language though.
The real kick comes when you use it with external libraries like prototype and scriptaculous. Then you can really start to do some Object Oriented Javascript and do some interesting stuff with it. If you plan to do crossbrowser support, I highly recommend you use protototype.

XHTML: a strict set of HTML and quite possibly the best version of HTML. It gets tricky when you embed plugins like QuickTime and Flash and try to validate your page but there are solutions to that.
Not a language for programming and not recommended for beginners.

CSS: the only language to add layout/design to your websites. Clean, but it requires a big amount of knowledge to make it work with multiple browsers.

PHP: a mix between perl and C++ (especially with PHP5). If you stick to the basics it's quite well, but it gets complicated otherwise. Plan your work before attempting to write some code.

Ruby on Rails: if you wanna avoid PHP, use Rails. It uses the Ruby language which has be favoured by many and Rails adds more functionality specifically for webdevelopment. You can quickly make a basic blog site and Rails allows you to write javascript and XML in Ruby.

ASP .Net: bad, incompatible, limited, PC-only development, worse than PHP

Tools to write all this (except ASP ofcourse): TextMate!

"When you dream, there are no rules..."
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #11
Pros:
• You learn a new and useful tools.
• You figure out new ways to approach problems.
• Fun!
• You don't end up with some false preconceptions like "I know the best way to solve X problem" when you don't.

Cons:
• none? maybe you can lose some hair in the process Wink


So yes, I highly recommend Different Languages!

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Moderator
Posts: 592
Joined: 2002.12
Post: #12
unknown Wrote:Cons:
• none?

In real world use someone has to pay for the time spent learning the new languages. This can be either your employer's money or your personal life.
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #13
Yeah but you if you do have some spare time you could
1) watch friends on tv
2) read a book
3) go for a cycle
4) learn a new programming language

I don't think the money aspect of it is relevant.

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Moderator
Posts: 1,560
Joined: 2003.10
Post: #14
C: Pure beauty. I fell in love with this language the first time I used it, and five years later, it's still at the top of my list. Nothing can quite compare to the raw power, flexibility, and elegance C provides.

Objective-C: A very nice extension of C. Adds useful features without detracting from the core language.

C++: Good effort, but not very usable. Syntax quirks, incompatibilities, and unnecessary complexity make it something I'd prefer to avoid when possible. If its "++" features are used carefully and sparingly, though, I could see it being tolerable for small projects.

Java: Horribly restrictive. Feels like I'm coding with one hand tied behind my back. Takes the concept of object orientation way too far.

Ruby: It has its pros and cons. Useful for web programming, but even then I get tired of it pretty quickly. Not something I'd want to have to use on a daily basis.

Perl: Similar to Ruby, but significantly messier and more hackish.

Lingo: A horrible abomination in every possible way. I only mention it because I had to write large amounts of code in it during my day job years ago...
Quote this message in a reply
Moderator
Posts: 770
Joined: 2003.04
Post: #15
C: Pros: teaches you how to things are actually done, forces you to understand programming (and that's a good thing). Cons: Not so good for large projects.

C++: Pros: OSC hates it Smile . At a basic level, allows you to write nicer C code with zero performance losses. Cons: If you use every and all features available, it becomes and unreadable mess. Not as dynamic as other OO languages.

PHP: Pros: OSC hates it too. It's the C of web languages. If you know C, you know PHP. Very easy to get up and running, allows you to do anything you want, (Con: including a huge unmaintainable mess if you don't plan ahead). Very fast. With PHP 5, OO becomes a lot easier.

Phyton: I don't know. I learned it in a few hours for a coding challenge, never used it after. Didn't particularly like the syntax.

Ruby on Rails: Fine as long as you stick to the rails. I hated the silly plurals/singular rules for table names, the forced folder hierarchy, the use of a database as a dumb repository and the abysmal performance.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Best/Fastest - What do the pros use? carmine 6 3,851 Jun 6, 2008 11:51 AM
Last Post: arekkusu
  High and Low Level Languages FlamingHairball 22 10,007 Jan 8, 2008 10:23 PM
Last Post: PowerMacX
  What languages do you need for a MMORPG? Lost22 12 5,629 Nov 20, 2007 01:07 AM
Last Post: Lost22
  Re-introduction of low level languages? Duane 4 3,150 Oct 30, 2007 03:10 AM
Last Post: OneSadCookie
  Some questions on languages from a new guy (...beginners) ProfessorApe 20 7,805 Jan 24, 2007 03:10 PM
Last Post: leRiCl