Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

The Case for PHP

Name: PHP Programmer !Iu.pILuqdY 2009-12-17 3:18

I am a programmer. I have dealt in many languages, but I have ended up with PHP. PHP is the best language for implementing general programs.

PHP is fast. It's no C/C++, but it's head and shoulders above comparable high-level languages.
PHP is memory-managed.
PHP supports just the right level of features. It doesn't have C++'s feature fetish.
PHP has an expansive, (mostly) cross-platform API. It's not perfect, but it sure beats writing everything yourself.
PHP and its API are constantly being improved.

In any program of significant size, the problem isn't writing your Bloom filters or splay trees with elegant syntax. It's a problem of communication with other programmers (including library-writers). PHP's strict typing, rigid structure, documentation system, and excellent developer tools (aka Eclipse) all help you out.

It's not perfect. Sure, first-class functions would be nice, but you never use them except on your homework assignment where you pass the comparator to a sort function. If you're building a little toy program, it's a pain to put everything in an object, but you'll be thankful you did once that program gets big enough. The syntax sucks, but it's familiar. Sure, Eclipse is slow, but suck it up big balls.

PHP isn't perfect, but it's the best in practice.

Name: Anonymous 2009-12-17 3:40

I am a programmer. I have dealt in many languages, but I have ended up with java. javais the best language for implementing general programs.

java is fast. It's no C/C++, but it's head and shoulders above comparable high-level languages.
java is memory-managed.
java supports just the right level of features. It doesn't have C++'s feature fetish.
java has an expansive, (mostly) cross-platform API. It's not perfect, but it sure beats writing everything yourself.
java and its API are constantly being improved.

In any program of significant size, the problem isn't writing your Bloom filters or splay trees with elegant syntax. It's a problem of communication with other programmers (including library-writers). java's strict typing, rigid structure, documentation system, and excellent developer tools (aka Eclipse) all help you out.

It's not perfect. Sure, first-class functions would be nice, but you never use them except on your homework assignment where you pass the comparator to a sort function. If you're building a little toy program, it's a pain to put everything in an object, but you'll be thankful you did once that program gets big enough. The syntax sucks, but it's familiar. Sure, Eclipse is slow, but suck it up big balls.

java isn't perfect, but it's the best in practice.

Name: Anonymous 2009-12-17 3:52

PHP is fast. It's no C/C++, but it's head and shoulders above comparable high-level languages.
There's many languages faster and better designed than PHP. There is a world's difference between compiled code and interpreted source code. Some speed can be gained by compiling PHP to bytecode, but it's still not native code, and it's not JITted either. It could be made considerably faster.
PHP is memory-managed.
Most other high-level languages are garbage collected too.
PHP supports just the right level of features. It doesn't have C++'s feature fetish.
There is no right level of features. The problem with C++ is that it took C and bolted too many features to it, which is a problem as C was meant to be a low-level language. There other high-level languages which are very featureful, but aren't a pain to use.
PHP has an expansive, (mostly) cross-platform API. It's not perfect, but it sure beats writing everything yourself.
That's a win for PHP, but the problem with its API is that it's very inconsistent. It's a mess, but you can learn to deal with it.
PHP and its API are constantly being improved.
PHP made some bad design choices when it was originally designed, and some of those choices will remain.
PHP's strict typing, rigid structure
Strict typing? in PHP?
Sure, first-class functions would be nice, but you never use them except on your homework assignment where you pass the comparator to a sort function.
Once you have first-class functions, you'll be surprised how much you'll use them, in an utility program I've written yesterday, here are the statistics:
Linecount: 160 lines
Functional parameters: 9 times (7 named functions, 2 lambda expressions)
This was some basic code which processed a data file, extracted some information from it, created a small in-memory hashtable of some structures, converted those structures to a format more acceptable for the output, and then proceeded to write the output file. Code is re-entrant and could have been multithreaded, and the application is meant to be ran from the CLI.
If you're building a little toy program, it's a pain to put everything in an object, but you'll be thankful you did once that program gets big enough.
I used to do "OOP" programming when I used PHP as it was an acceptable way of managing complexity, but if you have a well designed language with first class functions, macros and other useful features, you won't be using classes/objects as a way to organize code, you'll just be using them as data structures as they're meant to be used.
PHP isn't perfect, but it's the best in practice.
What is best in practice depends on the individual and the problem domain.

Name: Anonymous 2009-12-17 4:44

>>1
Case dismissed. I find in favor of the defendants; PHP is not the best language for general programs.

In terms of speed, it's worse than Lua, it's worse than many Lisps. It's faster than Ruby, but that's saying just about nothing.

Memory management? Don't make me laugh.

"Just the right level of features" - you seem to have missed the "for a particular purpose" part of that statement. I can't argue that it doesn't have nice features for you, but that doesn't make the language better in the general case, it only makes it better for you.

Your comment about Sepples and a "feature fetish" is also unwarranted. You have either no clue what you're talking about or you know exactly how to look like you have no clue what you're talking about.

API is a pointless argument.

It's not perfect and it's not even particularly good. Your entire case is composed of things that either have nothing to do with the language, incorrect assertions, assertions about things that don't matter or are so universal that they aren't even a point. I reiterate, case dismissed. IHBT, you crafty hooligan.

Name: Anonymous 2009-12-17 6:27

PHP has an expansive, (mostly) cross-platform API. It's not perfect, but it sure beats writing everything yourself.
PHP and its API are constantly being improved.


OVER 9000 FUNCTIONS back to /b/ :(

Name: Anonymous 2009-12-17 12:57

I am a programmer. I have dealt in many languages, but I have ended up with Blub. Blub is the best language for implementing general programs.

Blub is fast. It's no C/C++, but it's head and shoulders above comparable high-level languages.
Blub is memory-managed.
Blub supports just the right level of features. It doesn't have C++'s feature fetish.
Blub has an expansive, (mostly) cross-platform API. It's not perfect, but it sure beats writing everything yourself.
Blub and its API are constantly being improved.

In any program of significant size, the problem isn't writing your Bloom filters or splay trees with elegant syntax. It's a problem of communication with other programmers (including library-writers). Blub's strict typing, rigid structure, documentation system, and excellent developer tools all help you out.

It's not perfect. Sure, first-class functions would be nice, but you never use them except on your homework assignment where you pass the comparator to a sort function. If you're building a little toy program, it's a pain to put everything in an object, but you'll be thankful you did once that program gets big enough. The syntax sucks, but it's familiar. Sure, the IDE is slow, but suck it up big balls.

(Also, you seem to have missed the bits about Eclipse, >>1-chan)

Name: Anonymous 2009-12-17 13:12

I don't know how any language tries to pass off memory management as a feature these days. Memory-managed languages predate C and they are The Right Thing™ in the vast majority of situations.

Name: Anonymous 2010-11-14 3:46

Name: Anonymous 2011-02-03 8:13

Name: Anonymous 2011-02-17 20:27

check 'em dubz

Don't change these.
Name: Email:
Entire Thread Thread List