PDA

View Full Version : Revised: What is your favorite programming language?


akb825
2006.03.09, 12:13 AM
This is the revised version of my previous thread. AKA: I remembered to add ObjectiveC. :p Duke out your favorite languages here.

For me, C and C++ are my favorites. C for things I don't need much OO stuff in, C++ for when I do.

Nick
2006.03.09, 12:33 AM
I assume that selecting multiple responses is allowed (since you didn't disable it), but I like the whole C family (C, C++, Objective-C).

AnotherJake
2006.03.09, 12:41 AM
Yeah multiple choices is the name of the game with this poll. Definitely a good choice for this type of poll. I've never set up a poll in vBulletin. Just out of curiosity, is there a way to get it to do the multiple choice poll with the percentages actually meaning something? 50% 50% 20% reminds me of the old Speedy Gonzales cartoons going, "Feefty Feefty. No. Ok. Seexty Feefty."...

PowerMacX
2006.03.09, 01:52 AM
(Multiple choice poll) == (non-exclusive choices) == (sum >= 100)
;)

OneSadCookie
2006.03.09, 02:43 AM
I'm kinda surprised Ruby, Python and Perl, at least, weren't mentioned by name... and where are LISP, Scheme, OCaml, Haskell and Prolog? Surely languages don't have to be procedural for them to be people's favorites!

akb825
2006.03.09, 02:59 AM
I was going more for compiled languages, and more specifically ones that would be more likely to be used for games. I suppose BASIC is somewhat of a stretch, but most derivatives used in games right now are compiled. (like TNTBasic or REALBasic)

arekkusu
2006.03.09, 03:19 AM
Assembly >:)

DoG
2006.03.09, 05:04 AM
I was going more for compiled languages, and more specifically ones that would be more likely to be used for games. I suppose BASIC is somewhat of a stretch, but most derivatives used in games right now are compiled. (like TNTBasic or REALBasic)

If that is what you are asking, you should have given a less general title to the poll. But I agree with OSC, this is a preeeetttty flawed poll ;)

Taxxodium
2006.03.09, 05:36 AM
I'm kinda surprised Ruby, Python and Perl, at least, weren't mentioned by name... and where are LISP, Scheme, OCaml, Haskell and Prolog? Surely languages don't have to be procedural for them to be people's favorites!

In that case I would've voted for AppleScript :)

unknown
2006.03.09, 07:24 AM
We need a poll that lets you add your own options.

Hog
2006.03.09, 08:10 AM
I voted for C++ and other, i heard good things about C# but never tried it out myself so i didn't vote for it. I don't really feel comfortable with plain C.
I dislike Objective-C and Java for all the wrapper madness, and i like Python.
Assembly is much nicer to use than Basic.

AnotherJake
2006.03.09, 08:58 AM
(Multiple choice poll) == (non-exclusive choices) == (sum >= 100)
;)
Sure, okay. I guess the question I was asking is: Is there an option to represent the results of a multiple choice poll in a mutually exclusive way? For instance, let's say I voted for both C and Objective-C and those were the only two available choices in the poll. The way it is showing currently would be:

C 100%
Obj-C 100%

Can that not also be represented as:

C 50%
Obj-C 50%

Maybe that doesn't make sense. I don't know. I am not a statistics guy. But it would make sense to me that half of my total vote went to C and the other half to Obj-C. So again, my question being, does vBulletin not have this option? Again, I'm just curious. I see a total number of votes, and I see there are a specific number of votes in each category. Surely that could also be a valid poll representation.

Leisure Suit Lurie
2006.03.09, 11:28 AM
I suppose BASIC is somewhat of a stretch, but most derivatives used in games right now are compiled. (like TNTBasic or REALBasic)

Yeah. Such a stretch...that the top rated game in OMG(Escort Wing) was written in BlitzMax.

diordna
2006.03.09, 12:06 PM
Thanks Dan :)

akb825
2006.03.09, 12:14 PM
Yeah. Such a stretch...that the top rated game in OMG(Escort Wing) was written in BlitzMax.
I meant a stretch as far as compiled is concerned, because traditionally it's interpreted.

akb825
2006.03.09, 12:19 PM
If that is what you are asking, you should have given a less general title to the poll. But I agree with OSC, this is a preeeetttty flawed poll ;)
If I were to try to put every scripting language and hardly used compiled language in there, I'd quickly run out of items and I'd get more complaints. ;) (why did you include Perl and Python, but not Ruby?) I suppose I could have included assembly, but it's really not used that often any more. These are pretty much the most common languages used here, AFAIK. If other gets too many votes, we can ask everybody what languages they want to add to the list and we can make a revised revised poll. :p

DoG
2006.03.09, 12:33 PM
Just in case anybody is thinking about what to click on the poll too seriously: http://www.cabochon.com/~stevey/blog-rants/tour-de-babel.html

Najdorf
2006.03.09, 12:59 PM
That's a fun article :-)

Ok, you can mess up in C++ if you're not careful, but if you're good you can provide extremely powerful and easy to use tools (such as the STL)

DoG
2006.03.09, 01:09 PM
...easy to use tools (such as the STL)

I nearly had a deadly coughing fit when I read that one. Must be the first time in history I see "easy to use" and STL mentioned in the same sentence. Ease of use is definitely not one of the glorious properties of the STL.

ThemsAllTook
2006.03.09, 01:54 PM
C is in the lead! :D :D

This pleases me greatly.

WhatMeWorry
2006.03.09, 02:20 PM
Where's UNIVAC binary? Wimps :)

JustinFic
2006.03.09, 02:37 PM
C++ and Lua. I'm an OOP-whore. I use STL too but I feel like I'm sinning every time I do. Not that it stops me.

Oh, and Hypertalk pwns me.

akb825
2006.03.09, 02:53 PM
When I'm programming in C++, I generally use the C standard library and make my own custom data structures. Sure, it probably takes longer, but I know it has what I want and need. I think the main drawback of the STL is that it isn't very well documented, though I haven't used it much myself. From what I've seen, though, it doesn't appear too difficult to use. I generally don't use a very large portion of the standard libraries of either language, really, just what I need for file IO etc.

Leisure Suit Lurie
2006.03.09, 05:45 PM
I meant a stretch as far as compiled is concerned, because traditionally it's interpreted.

The only Mac BASIC I can think of that's interpreted is Chipmunk.

(Fight)(Fight)(Fight)

I am the BASIC pimp.

akb825
2006.03.09, 09:48 PM
BASIC was originally interpreted, and it's only recently that it became compiled. (I guess in an attempt to make it more mainstream)

Najdorf
2006.03.09, 09:51 PM
Well java isn't even compiled afaik, still it's in the list.

akb825
2006.03.09, 09:57 PM
It's still considered a compiled language. It's basically the machine instructions for a virtual machine, rather than keeping the instructions the same as what you read and parsing it each time it's run.

Skorche
2006.03.09, 10:00 PM
Well java isn't even compiled afaik, still it's in the list.

It's not? It's compiled once to an intermediate bytecode and possibly a second time to native code if the VM sees fit to do so at runtime. It's just not compiled in the 'traditional' C/C++ way.

For that matter, any language that is traditionally interpreted could be compiled. Heck, with Forth, compiling and interpreting are practically the same thing. Lisp, a language that is traditionally interpreted has compilers that exist for it.

Najdorf
2006.03.09, 10:15 PM
I heard there's also an assemby interpreter that runs really slow :P

akb825
2006.03.09, 10:24 PM
That would probably be more like an emulator. :p We could probably beat this to death, and I'm sure there's C interpreters out there somewhere. I just listed the most common compiled languages that are used for games and applications, whether compiled into interpreted bytecode or compiled when it traditionally is not. (but is mainly compiled today)

BTW, C# also runs on top of a virtual machine. It's basically like Java, but only works correctly on Windows (because of the .NET framework) and gives the programmer a bit more control.

OneSadCookie
2006.03.09, 10:36 PM
BTW, C# also runs on top of a virtual machine. It's basically like Java, but only works correctly on Windows (because of the .NET framework) and gives the programmer a bit more control.

http://mono-project.com/

akb825
2006.03.09, 10:45 PM
I qualified my statement for that reason, but I would say that it has a lot more available on it for other systems than I thought.

akb825
2006.03.10, 04:11 AM
Ok, other is beating everything but C and ObjectiveC. I think I'll make yet another revised poll. What other languages do you want me to include? I will be able to include 8 more languages, 9 if you want me to take off C#. I'll take the top ones mentioned.

DoG
2006.03.10, 04:55 AM
There are a myriad languages, just make a thread where everyone can post their favourites without any checkboxes.

BeyondCloister
2006.03.10, 04:59 AM
I'm currently using STL on a project and also used it for a project last year. I would not say it was difficult to use. It certainly made the code cross-platform.

I think you should leave C# in the poll as there are a number of multi platform developers here and it is used in Unity is it not?

PowerMacX
2006.03.10, 05:31 AM
If this is a favorite programming languages, as opposed to "languages you currently use" (which was the subject of polls in 2004 & 2005, although I can't seem to locate them), then I'd like to see Logo (:love: - my first programming language).

Oh, and Whitespace (http://www.google.com/search?client=safari&rls=en&q=Whitespace+programming&ie=UTF-8&oe=UTF-8) (again, only if this is going to be a "favorite language" poll ;) )

Leisure Suit Lurie
2006.03.10, 07:13 AM
Shall we re-title this thread: "Beat up on akb825"? :p

I probably would've voted Logo, too. Instant gratification is a great feature in a a language.

unknown
2006.03.13, 02:47 AM
This is strange, Why is Objective-C so popular?

OneSadCookie
2006.03.13, 03:56 AM
Because it's what you program Cocoa in... also, it's a nice language -- most of the benefits of a really dynamic OO language, with most of the benefits of an efficient low-level language.

Bachus
2006.03.13, 09:09 AM
This is strange, Why is Objective-C so popular?

All the power of C, with all the niceness of Smalltalk without all the horribleness of C++, or retardedness of Java or C#. Ain't perfect, but a hell of a lot better than the alternatives.

akb825
2006.03.13, 12:27 PM
Unfortunately the API has such a high learning curve. Of course, that isn't really the fault of the language. I still prefer C++, and don't really know why so many people hate C++. :\ (I certainly agree with the comment about the retardedness of Java and C#, though :p)

OneSadCookie
2006.03.13, 02:39 PM
C++ is "low-level", so it should be good for writing efficient code in. Unfortunately, there's so much going on behind the scenes with pass-by-reference, copy constructors, assignment operators, etc, that it's not actually easy to optimize C++ code. If you want efficient code, you write C, 'cos at least you know exactly what's going on.

C++ is "object-oriented", so it should be easy to write high-level code in. Unfortunately, there's so little flexibility, reflection, and dynamism in what it provides that you don't have the tools to easily write high-level code. The APIs that try it end up inventing a whole extra layer of dynamism and reflection (Qt's MOC, for example). If you want a high-level language, use Python or Ruby... heck, even Java (too-rigid static typing) and ObjC (no garbage collection) are better.

That's why *I* hate C++ -- it's never the right tool for any job.

unknown
2006.03.18, 06:03 AM
New favorite language: http://42mag.com/michael/apl/index.html :love:

Najdorf
2006.03.18, 09:00 AM
I heard brian greenstone saying on the IMG podcast that C is good and C++ is evil... and that if he had written his games in C++ he would have had a much harder time to universalize them.

BlitzMax coding is actually kind of a sloppy C++, where for instance all fields of a class are public (yay!), and all objects are passed in functions by reference. And that's about how I code in C++ too ;-)

akb825
2006.03.18, 01:32 PM
I heard brian greenstone saying on the IMG podcast that C is good and C++ is evil... and that if he had written his games in C++ he would have had a much harder time to universalize them.
I'm looking for more of the "why." Keith gave me a decent answer, but I haven't had any problems and don't foresee any problems with what I'm working on. Mainly because I can check specific types with dynamic_cast<>() (since it returns NULL if the cast isn't valid) and I can specify behavior with virtual functions, and pass it up higher with scope resolution (to a superclass) if I just want to add something before the superclass' implementation. Perhaps my opinion about C++ will change as I do more with it if I run into some limitations.

AnotherJake
2006.03.18, 01:54 PM
I heard brian greenstone saying on the IMG podcast that C is good and C++ is evil...
And he also said he would NEVER use Cocoa. I guess everybody has their own opinions. Saying "NEVER" about using Cocoa seems a little ignorant to me, but hey, that's just *my* opinion. Brian, if you're reading this, no offense, but that's why your system UI's look like they came straight out of the nineties. ;)

BTW, I don't like C++ either. My opinion is that it's overkill for basically everything. I don't think I'd go so far as to call it `evil' like OSC and Greenstone do, but I wouldn't disagree.

OneSadCookie
2006.03.18, 04:18 PM
C++ is not inherently any harder to universalize than C. The issue is that GCC 4.0 is much stricter about C++ than GCC 3.3, so plenty of code that compiles without error or warning on 3.3 isn't accepted by 4.0. If you have code that already compiles with GCC 4.0, there are no issues.

The issue with C++ isn't (particularly) that it's a bad language; simply that it's notably inferior than other languages. If you've only ever programmed in C++, you have no points of reference, so chances are you'll think it's great. It's only once you've had substantial exposure to many different languages that you realize just how much work programming in C++ is.

akb825
2006.03.18, 04:34 PM
I've programmed in C, C++, ObjectiveC and Java. I don't like Java because they take away power to "protect" me, which ends up causing me to do more work with many things. ObjectiveC is fairly nice, but there are a few things that I miss such as operator overloading and templates. I haven't yet needed multiple inheritance, but it is also something nice to have. However, I do like the fact that ObjectiveC lets you call any method on any object, then determines at runtime whether or not the method exists. (such as with delegates) If you have too many "delegates" in C++ it can certainly get crazy with all the multiple classes you need to subclass with the controlling class. Other than that one exception, I don't think anything I've done in C++ was any more difficult/required more work than if I programmed in ObjectiveC or Java.

I do believe, though, that templates need a little work. It's kind of annoying having to include all of your source in the H file in order for it to compile. I don't know if we'll ever get to that point, since you can't compile all the way down without knowing something as basic as the type. I'm sure that they could make a special half-compiled format for C++ templates, though. However, I still think that the good outweighs the bad for templates.

I will agree that I only have a good year or so of experience, even though I've done quite a bit in that year, so it's not like my word is binding. My preferences may change as I program more and gain more experience. If you see something else about why you think C++ is worse than other languages, please tell. It would certainly give me more incite about programming in general, as well as choosing the best tool for the job.

OneSadCookie
2006.03.18, 05:55 PM
In my experience, having a sufficiently dynamic type system (like ObjC provides with 'id') completely negates the need for templates.

Operator overloading is nice for writing your own math classes (Vector, Quaternion, etc) but is almost completely useless outside that domain, and can scarcely be called "necessary" even within it. Lua and Python and Ruby all provide it, anyway.

The inability to call any method on any object is the biggest strike against the usability of C++ for a large project. It means you have to constantly fight the static type system, and constantly add new abstract classes to the inheritance hierarchy, and constantly name methods in ways you didn't want. Either that or extend the type system, eg. like Qt's MOC does, but by then, you might as well not be using C++.

The lack of garbage collection is also a big deal. By the time you've found all the memory leaks and crashes caused by trying to share an object between multiple "owners", you've wasted a lot of time. Yes, you can reference-count it, yes, you can use various kinds of automatic smart pointer, but it doesn't completely alleviate the problems, and it is plenty of extra work.

Remember, there's nothing sort of "inherently wrong" with C++, any more than there is with Pascal, or Ada, or whatever... it's the sum of many smaller irritations.

The big picture is, of course, what I said in my first post -- you want fast code? use C. You want easy-to-write code? Use Python or Ruby. You want both in the same app? No problem -- embed the little C you require. C++ is a poor compromise for either goal.