Let's Have a Language War

He has: 1,380 posts

Joined: Feb 2002

I think it would be beneficial to everyone on this form if we had an all out language war... aka pitting the merits of each language against each other. PHP, ColdFusion, .Net, CGI/Perl, etc.

If the mods agree, let's make this a sticky and then get started. Yeah?

(And maybe even do something similar for the different "AJAX libraries" in a different topic, for things like Prototype, GWT, etc. ?)

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

I guess it's hard to start a language war without saying something provocative. Wink

It's also difficult to argue about languages without having some common metrics and an overarching purpose to compare with. We need to know which tradeoffs are acceptable and which are not -- and this changes on a case-by-case basis.

An ugly language may be the best fit for a task where, for example, you're constrained by what the server or client supports. Some languages are designed to be domain-specific and can be more expressive in that particular field than other general-purpose languages. And so on.

I'm pragmatic about using languages in this way, but I certainly don't believe all languages are made equal. Some have their place -- if only because of historical accident -- and others really ought not exist. Smiling

When I can afford to make the choice, I prefer to use Lisp, which is both a powerful general-purpose language, and easily extended into specific domains.

Smiling

demonhale's picture

He has: 3,278 posts

Joined: May 2005

Hey Abhi, your logo/avatar looks like half-life from valve...

He has: 1,380 posts

Joined: Feb 2002

Psh this isn't what I envisioned. I was looking more for an informed but heated argument than polite sentences.

Something like...

PHP is the best language to use on the Internet, as far as server-side, self-compiling, 'delivery' languages go.
Microsoft's .NET products are a futile attempt at perfection - for many reasons.
ROR is a lazy man's attempt at programming.
Java is a proprietary language, and thus limited in use (also because of the plugin required).
Any form of C used on the 'frontend' of the internet is pointless and overwork... C, and all of it's derivatives, should be kept for server software purposes.
ColdFusion has it's moments, but again is proprietary and difficult to find hosting for.

...did I miss anything? Wink

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

brady.k wrote:
Java is a proprietary language

Not anymore. Java is licensed under the GPL (v2 -- for now). Smiling
http://www.sun.com/2006-1113/feature/

brady.k wrote: PHP is the best language to use on the Internet, as far as server-side, self-compiling, 'delivery' languages go.

For me, PHP is only the best choice in cases where unavailability of resources -- server support, developers and libraries -- discounts the competition. All else being equal, I wouldn't touch PHP with a barge-RPC. Wink

brady.k wrote: Microsoft's .NET products are a futile attempt at perfection - for many reasons.

All attempts at perfection are futile if we assume perfection in unattainable. .Net as a standardised platform is, well, not terrible. It seems to me a futile attempt at imitating Java rather than perfection. Languages on .Net themselves are hard to consider because there are so many of them, and they provide hybrids of the .Net API and the standard API of whatever they're implementing. Think IronPython, Visual J#, etc.

brady.k wrote:
ROR is a lazy man's attempt at programming.

It'd be more sensible to look at Ruby and Rails separately. The former is a language, the latter is a framework/library.

And laziness in programming is a good thing. Wink

For fun, check out Luke Welling's [url=http://lukewelling.com/wp-content/uploads/2006/08/programmer hierarchy.pdf]Programmer Heirarchy[/url]. Laughing out loud

demonhale wrote:
Hey Abhi, your logo/avatar looks like half-life from valve...

It is lambda, the symbol for nuclear half-life in physics, that Valve borrowed. But lambda is also found in the lambda calculus that inspired Lisp and functional programming. Smiling

He has: 1,380 posts

Joined: Feb 2002

Ok, well I completely disagree with alot of your points, here's why:

Java still requires a special set of tools to develop and run it. That alone should highly decrease it's value, on top of the fact that it hasn't been open source, and hasn't had the ability to be widely subject to the whims of it's users. Java also falls in the category of "lazy programming"... more on that later...

PHP ... I don't know what "barge-RPC" is. I tried to look it up on Google, and got nowhere. Anyways, PHP has all of the things you could ever want as a programmer, but you don't have to worry too much about memory management, pointers, or other things like you do in C. I consider PHP to be the web-equivalent of something in between C and C++... it's not overly developed like C++ but it's not completely bare bones either, like C. One of the best features is the fact that you can write your programs in any text editor (like Perl, or a number of other languages), but you don't have to compile it... and it's also fast.

.Net is an excuse for Microsoft to gain revenue through their "Windows [whatever] Server Edition" line. I agree that the languages are hard to consider, but the fact that there are a large number of choices, most of which are permutations of other languages not suited for the web environment, speaks unto itself. As a platform, I think it's a bad idea because of the simple fact that it's Microsoft, and they are in direct control of it. Maybe they have plans to secretly archive/steal all of your data and code every time you execute one of their scripts/programs/protocols.

ROR... Ok, we'll go with the language. When you get a language that's advertised as "you can build this complicated program in 10 minutes!" ... something's wrong. Ok, yes, it might be fast to write code. But you have little to no control over EXACTLY what is going on in the program. You call a bunch of predefined functions, and use simple commands to do complicated tasks... how is this a good thing? That is the programming equivalent of paying someone $5000 in advance to do undefined work on your car, and not ask for an explanation/breakdown afterwards... you are putting too much faith in it. If you don't have direct control over the language at a lower level than Ruby, how can you ever expect to do something revolutionary? It will be difficult, unless you are able to mash some libraries together or write your own... which also would semi-defeat the purpose of the language.

Also, I took a look at that Programmer Hierarchy... I actually agree with alot of it. But I think Perl deserves to be alot lower on the chart, and while I agree that Ruby programmers consider themselves to be superior to most, it is based on a false pretense.... basically their feeling of superiority is unfounded, and that they should be much lower. I'd be interested to see something similar to this chart... but with the added factors of "actually superior" and "functional use of language". haha

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

brady.k;222576 wrote: Java still requires a special set of tools to develop and run it. That alone should highly decrease it's value, on top of the fact that it hasn't been open source, and hasn't had the ability to be widely subject to the whims of it's users.

What special set of tools? Compiler, runtime, and editor? Sun has licensed the compiler and runtime under the GPL. Eclipse, Emacs, Vim, and whatever are all free editors. The development tools surrounding Java have traditionally been free; I guess it's partially what motivated Sun to free it completely.

Java has long been "open source" in a sense, in that subscribed developers/users have always had access to the source code and have contributed to the evolution of Java via sponsored communities.

brady.k wrote: PHP ... I don't know what "barge-RPC" is. I tried to look it up on Google, and got nowhere.

Heh, that was a bad pun on "barge-pole". RPC = Remote Procedure Call. Smiling

brady.k wrote: Anyways, PHP has all of the things you could ever want as a programmer, but you don't have to worry too much about memory management, pointers, or other things like you do in C.

PHP doesn't have everything I would ever want as a programmer. I want lexically scoped variables, a smarter GC, orthogonal standard library and core API, backwards compatibility, a consistent OO system, thread safety, graceful recursion, a REPL ... at least.

I don't think there's any hope of having closures, macros, first-class functions and many other things being included so I'll call them optional. Wink

brady.k wrote: I consider PHP to be the web-equivalent of something in between C and C++... it's not overly developed like C++ but it's not completely bare bones either, like C. One of the best features is the fact that you can write your programs in any text editor (like Perl, or a number of other languages), but you don't have to compile it... and it's also fast.

Somewhere between C and C++ is not necessarily a good place to be. What both of them sorely lack is the ability to extend the language and write expressive code. And where PHP is more dynamic than both of them, it is badly implemented.

Also, PHP isn't exactly fast -- this is a drawback of a naive compilation and GC routine. In fact, to make PHP perform quickly, caching compiled bytecode is advisable, for example by using a PHP accelerator.

brady.k wrote: .Net is an excuse for Microsoft to gain revenue through their "Windows [whatever] Server Edition" line. I agree that the languages
most of which are permutations of other languages not suited for the web environment, speaks unto itself.

Nod. Even though ASP.Net and, say, IronPython are reasonably good in isolation, I'm not sure if the whole .Net package works well on the web.

brady.k wrote: As a platform, I think it's a bad idea because of the simple fact that it's Microsoft, and they are in direct control of it. Maybe they have plans to secretly archive/steal all of your data and code every time you execute one of their scripts/programs/protocols.

They are not in direct control over the standardised versions of the platform. That's kind of what standardisation means. You may argue that they could leverage the market further by misleading users into eventually using non-standard versions. But that's all speculative, and it doesn't detract from standard .Net anyway.

brady.k wrote: ROR... Ok, we'll go with the language. When you get a language that's advertised as "you can build this complicated program in 10 minutes!" ... something's wrong.

Why? Sure, it won't be tested, customised or documented within 10 minutes, but you can build it and move on to the rest afterwards.

brady.k wrote: Ok, yes, it might be fast to write code. But you have little to no control over EXACTLY what is going on in the program. You call a bunch of predefined functions, and use simple commands to do complicated tasks... how is this a good thing?

Prevents duplication of code -- or reinventing wheels. Code re-use is a basic tenet of good programming.

Using simple commands to do complicated tasks is also a good thing because it saves you effort and time. The goal of most non-trivial programming is to resolve complexity, breaking a complicated problem into simpler pieces. How is that not a good thing?

You never have control over "EXACTLY" what is going on in a program, unless you program at the machine level. The point of abstraction and code re-use is to avoid caring about irrelevant implementation details.

If you built everything from scratch, you'd be more likely to introduce bugs and unreliability than if you used tested libraries. Modern compilers and GCs are frequently better at managing code than humans are.

And all of this is what PHP itself aims to be.

brady.k wrote: That is the programming equivalent of paying someone $5000 in advance to do undefined work on your car, and not ask for an explanation/breakdown afterwards...

It's more like saying to the mechanic, "fix my tyres", rather than "take that wrench over there, make sure it fits the bolt, then unscrew it...".

With debuggers and inspectors in dynamic language environments, you can get a lot more information about what's going on than otherwise. With exception handling, you can save, trace and understand runtime errors far more easily than without.

This is a different kind of control, where it's not the machine you care about as much as the problem you're trying to solve.

brady.k wrote: If you don't have direct control over the language at a lower level than Ruby, how can you ever expect to do something revolutionary?

More to the point, I'm not usually looking to do anything revolutionary. I want to write expressive, efficient, reliable, maintainable code, rapidly. I don't need direct control over low level details usually.

But sometimes I do. In those cases Ruby does fail. As does PHP, Perl, Python and many others. And this is another reason why I like to use Lisp -- it is both dynamic and compiled, and allows me to declare compiler hints to optimise programs when necessary. Think of it as a built-in accelerator.

brady.k wrote: It will be difficult, unless you are able to mash some libraries together or write your own... which also would semi-defeat the purpose of the language.

You'd have to write/mash less than if you wrote everything from scratch for the purpose of "direct control".

In Ruby or Python, you would have to add modules written in C or C++ to compensate for whatever is lacking. Note that you would only need a module or few; contrast this with writing the whole lot in C or C++.

However, I still consider that a shortcoming. Again, this is a reason why I like Lisp -- the implementation I use compiles to native code, making it comparable to (or better than) C in terms of speed, with the aid of compiler hints.

Smiling

teammatt3's picture

He has: 2,102 posts

Joined: Sep 2003

I've only programmed (if you would even call what I throw together a program) in SQL, PHP, C, and ASP. PHP is awesome, because I know it a lot better than ASP and C Sticking out tongue. I like C because it is crazy fast and I was always amazed at how fast I could write a million numbers to a file in a few seconds (other than that, C sucks Laughing out loud). SQL is SQL, not much to say about it. I hate to rip on Microsoft, but I find ASP very annoying. It doesn't have block comments, and you have to concatenate all your variables to print them out using Response.Write (maybe there's another way to do it?):

dim annoying_var
annoying_var = "cruel"
Response.Write("Hello" & annoying_var & "world.")
'

My language can beat up your language.

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

teammatt3;222581 wrote: I hate to rip on Microsoft, but I find ASP very annoying.

I think you're referring to VBScript. ASP itself is, like .Net, not terrible. With pre-.Net ASP, you could always use JScript rather than VBScript if you wished. With ASP.Net, you can use any .Net language, but as Kyle mentioned, most of them aren't implemented well.

Smiling

pr0gr4mm3r's picture

He has: 1,502 posts

Joined: Sep 2006

I wouldn't really have a place in this topic other than to defend PHP. That was the first web language I've learned, and I've never had a reason to learn another because it's always satisfied my needs, so I can't compare it. I have learned Java (and servlets), but I like PHP because it's less strict. In other words, I don't have to maintain web XML files, class structures, etc.

pr0gr4mm3r's picture

He has: 1,502 posts

Joined: Sep 2006

Quote: PHP doesn't have everything I would ever want as a programmer. I want lexically scoped variables, a smarter GC, orthogonal standard library and core API, backwards compatibility, a consistent OO system, thread safety, graceful recursion, a REPL ... at least.

I think PHP was meant to be a scripting language and not a "programming" language. It allows more sloppy, less structured code at the cost of features like those you mentioned.

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

pr0gr4mm3r;222609 wrote: I think PHP was meant to be a scripting language and not a "programming" language. It allows more sloppy, less structured code at the cost of features like those you mentioned.

I don't think that being a scripting language is an excuse for sloppiness or poor implementation of features on the part of the language developers.

A language that offers all those features I wish for can easily be (ab)used by users in a sloppy and unstructured way -- there is no such "cost".

In a less pejorative sense, maybe you mean that PHP is simply more dynamic or interactive than many languages like Java or C? Well, it's comparable to or worse than Python, Ruby, Lisp and others, really. Being well-designed and structured doesn't make a language environment less dynamic. Smiling

Still, you raise a salient point, in that PHP wasn't originally intended to be what it's now expected to be.

PHP started off as a language limited in scope to building websites, but still needed some general features, like a parser, runtime, data structures, etc. Then, to enable increasingly sophisticated techniques, it began acquiring even more general features like OO, GC, error handling, etc. Now the PHP homepage itself says, "PHP is a widely-used general-purpose scripting language that is especially suited for Web development".

Unfortunately, few of these general-purpose features have been implemented satisfactorily. And none of them are original enough to warrant reinventing complex systems anyway, in my opinion. It should really have been created in the other direction.

PHP's useful bits could have been written as an extension to a well-designed and well-implemented general-purpose language, in which case it would have inherited all of its general features while still providing a good web-focused environment. Maybe it wasn't viable back when PHP began, but it sure is viable now.

Smiling

demonhale's picture

He has: 3,278 posts

Joined: May 2005

off topic... Yeah I thought I saw that in my class before, but pop culture has ruined it for me, now when I see that symbol, I immediately type adjust_crosshair.

Anyway, this thread seems to be an eye opener for me...

He has: 1,380 posts

Joined: Feb 2002

(I read your re-re-response, but I don't have time to argue... probably tomorrow)

sublimer's picture

They have: 41 posts

Joined: Aug 2006

This is hard to debate. To me it's like saying what do you think the best weapon is?

Well, the nuclear bomb does a whole hell of a lot more destruction than a hand grenade, but they have different purposes and different applications.

If you were trying to say what language is best for doing so and so, then we have a discussion. The question is too broad.

Personally, I love PHP. And that's what I'll stick with for web development until it becomes outdated.

greg's picture

He has: 1,581 posts

Joined: Nov 2005

PHP and MYSQL compliment each other
both are free
both give substantial usage and control over programming requirements

novices can quickly learn it to rattle a few simple scripts together, simple they may be but adding extreme functionality or end user options to their site

Advanced programmers can use it to get may proffessional functions

ASP is made by microsoft, I don't need to say anything else really, apart from a simple formula-

$$$ + Confused :confused: Confused * MS ACCESS = ASP

ASP / My Life = -20 years

Laughing out loud

sublimer's picture

They have: 41 posts

Joined: Aug 2006

greg;222740 wrote:
ASP is made by microsoft, I don't need to say anything else really, apart from a simple formula-

$$$ + Confused :confused: Confused * MS ACCESS = ASP

ASP / My Life = -20 years

Laughing out loud

Couldn't have said it better myself. I worked with ASP and Access for a few weeks. Me and my partners said screw this and went LAMP!

JeevesBond's picture

He has: 3,956 posts

Joined: Jun 2002

Abhi wrote: I want lexically scoped variables, a smarter GC, orthogonal standard library and core API, backwards compatibility, a consistent OO system, thread safety, graceful recursion, a REPL ... at least.

Are the PHP developers not slowly working towards this and given the rather large strides that have been taken towards getting stuff like OO and cleaning up the messes in PHP can we reasonably expect backwards compatibility? Smiling
To my mind, and I don't really pretend to know that much on the subject (I just use PHP and don't think about it too much), PHP is not even a complete language. It's like one giant pre-release test where nothing is stable and the API is being worked on all the time. Not suprising when one considers PHP's history!

Hey Abhi, what's wrong with RPC. Or was that just a bad pun for the sake of it? Wink

sublimer wrote: Me and my partners said screw this and went LAMP!

Am really wondering about this sort of thing. There was an article on Slashdot today, all about 'Netcraft Says IIS Gaining on Apache', but I see little evidence among the people who turn up here (both experienced programmers and the less exerienced). The comments thread is full of: this is because .NET is so brilliant! Everyone I know is switching from Java/PHP/Ruby to .NET!

Granted the Netcraft methods are hardly foolproof and Microsoft have been paying companies off to increase their market share, but I keep seeing comments on how fantastic .NET is and how it beats LAMP. Yet none of these people ever turn up here. Is it because we don't suit their demographic, or because all these people pumping-up .NET are actually MS shills? Anyone got any theories and is GNU+Linux dead as a webserver?

a Padded Cell our articles site!

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

JeevesBond;222758 wrote: Are the PHP developers not slowly working towards this and given the rather large strides that have been taken towards getting stuff like OO and cleaning up the messes in PHP can we reasonably expect backwards compatibility? Smiling

Exactly, we can't reasonably expect backwards compatibility from PHP now. So PHP is a bad choice for those of us who want it.

They are making progress. They have a long way to go. I'm not holding my breath. Smiling

JeevesBond wrote: To my mind, and I don't really pretend to know that much on the subject (I just use PHP and don't think about it too much), PHP is not even a complete language. It's like one giant pre-release test where nothing is stable and the API is being worked on all the time. Not suprising when one considers PHP's history!

Sorry, I don't understand how PHP is not a complete language. Confused

A growing, changing API is not a bad thing. I think all languages (or implementations) have it.

I don't claim to know a whole lot either. I learned all these things from experience, particularly by using other languages. I still use PHP, though I don't prefer it anymore.

JeevesBond wrote: Hey Abhi, what's wrong with RPC. Or was that just a bad pun for the sake of it? Wink

Nothing wrong with it at all! (Are poles wrong because you wouldn't touch a nasty thing with a barge-pole?) It was a terrible pun for the sake of it. Laughing out loud

JeevesBond wrote: Granted the Netcraft methods are hardly foolproof and Microsoft have been paying companies off to increase their market share, but I keep seeing comments on how fantastic .NET is and how it beats LAMP. Yet none of these people ever turn up here. Is it because we don't suit their demographic, or because all these people pumping-up .NET are actually MS shills? Anyone got any theories and is GNU+Linux dead as a webserver?

We get a few of them here. (I won't name names.) I don't think we appeal to them quite as much. My impression is that a lot of them learn web stuff at institutes, and not so much independently. They spend a lot more time on MSDN or other MS-focused sites than in places like TWF.

It could even be that free software documentation is generally so bad that it drives inquiring users to independent support forums. Sticking out tongue

GNU+Linux on the web is far from dead. Smiling

He has: 1,380 posts

Joined: Feb 2002

Just a brief comment, as I'm still too busy to have a huge argument...

Quote:
Abhi: "it could be that free software documentation is generally so bad that it..."

I don't want to sound like a continual PHP fanboy here, but I find the PHP docs to be fantastic. And if it's not in the official doc, then a comment or two below the item you need help on usually does the trick.

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

brady.k;222763 wrote: I don't want to sound like a continual PHP fanboy here, but I find the PHP docs to be fantastic. And if it's not in the official doc, then a comment or two below the item you need help on usually does the trick.

I agree.* I did refer to "free software documentation generally". Smiling

Distro docs are not usually that good, though there are occasional exceptions. Apache's is pretty bad, imo. MySQL's was nasty until relatively recently, when they made it more like PHP's.

* PHP PEAR's docs, however, are subpar. Maybe because it's not popular enough to attract eyeballs.

PHP applications tend not to be quite so well documented, which is another source of visitors to TWF.

Smiling

JeevesBond's picture

He has: 3,956 posts

Joined: Jun 2002

Abhi wrote: Sorry, I don't understand how PHP is not a complete language.

Sorry, I meant that it's not finished yet. The API of all languages may be growing and changing, but PHP's is fundamentally changing. I meant it's as if PHP hasn't even reached V1.0 yet and that we've all been taking part in the public beta for a number of years. Smiling

Not that I dislike PHP, it's good at what I want it to do.

Getting back to Apache Vs. IIS (has anyone used v7 of IIS, it's meant to be very modular and a lot faster than Apache?), I believe we could see a switch from GNU+Linux+Apache+MySQL+PHP to GNU+Linux+Lighttpd+MySQL/PostgreSQL/SQLight+Ruby on Rails as the development environment of choice on GNU+Linux. It's the Free software answer to .NET, probably easier to develop using RoR than .NET too (am guessing). Regarding Netcraft: as a great believer in 'lies, damn lies, and statistics' it seems to me that Microsoft are paying people off to bend the metrics in their favour. They're up to a lot worse at the moment! Smiling

Abhi wrote: We get a few of them here. (I won't name names.)

Well, I can only think of one and they left in a steaming fit of anger. Apparently we're too biased toward Free software (then why am I the only one who helps with ASP questions?!). Sad

Abhi wrote: They spend a lot more time on MSDN or other MS-focused sites than in places like TWF.

True, perhaps Microsoft people just aren't as sociable/helpful as Free software people. Hows about this for a slogan: Developers who do it only as a job use Microsoft, developers with passion use Free software. There's certainly no sense of community around Microsoft products, not in the way Apple and Free software have managed to garner for themselves. Smiling

a Padded Cell our articles site!

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

JeevesBond;222788 wrote: Sorry, I meant that it's not finished yet. The API of all languages may be growing and changing, but PHP's is fundamentally changing. I meant it's as if PHP hasn't even reached V1.0 yet and that we've all been taking part in the public beta for a number of years. Smiling

I think other languages are comparable in this way too. Java 1.7, Python 3, Ruby 1.9 and ECMAScript 4 are all going to be very different from their ancestors in all sorts of major ways. PHP is from the same generation as those languages, so I see no acceptable reason why it should lag behind so much.

JeevesBond;222788 wrote:
I believe we could see a switch from GNU+Linux+Apache+MySQL+PHP to GNU+Linux+Lighttpd+MySQL/PostgreSQL/SQLight+Ruby on Rails as the development environment of choice on GNU+Linux. It's the Free software answer to .NET

This is an interesting possibility. I'm considering switching away from Apache too -- but I'm too fond of it to let go just yet. It is still reasonably quick and modular (how's that for understatement?). I'm looking at Lighttpd or Hunchentoot for now.

JeevesBond;222788 wrote: Developers who do it only as a job use Microsoft, developers with passion use Free software.

Good point.

There is a slight sense of community around MS though -- it seems to turn up in meatspace more than online, and mainly in work circles, as you mentioned, or within Microsoft itself. Whereas Free software communities emerge everywhere.

Smiling

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.