A new PHP coders experience:
Day 1: This is like Perl just... without all the cool stuff :\
Day 2: Actually, it's not too bad. For web work it's actually very occasionally easier to use than Perl, and has less overhead (except for mod_perl, but that's a bitch)
Day 3: I miss all Perl's quote operators. Escaping things is a bitch :(
Day 4: It is becoming apparent that a lot of areas of PHP had little thought put into them. Functions behave inconsistently with each other, 'features' such as magic quotes are inconsistant, useless and annoying to real programmers, and in some cases cannot be turned off. Certain design decisions are seriously restricting me here...
Day 5: mysql_* sucks compared to DBI
Day 6: Argh. Random bugs in the interpreter and runtime environment. Argh!
Day 7: Programmer ports all the really heavy stuff to Perl and no longer has problems. Leaves all the super light web interface stuff in PHP.
Name:
Anonymous2004-12-25 10:35
Your title is not correct:
this is a perl coder first php experience.
Besides. Nobody know what the fuck happens in perl code after it hasnt been read in 2 day's. Its too fucking cryptic. even more so with all the short anotations.
Name:
Anonymous2004-12-25 11:23
php is fast for web
its fast, thats why
grandaddy perl can obviously do more, but thats not the point
If you are saying its performance is fast, PHP and mod_perl perform roughly the same.
If you are saying you can quickly throw together a little app that grabs values out of a database and shows them on a page, sure, that's what a toy language is good for. For real work, you still want a real language.
Name:
Anonymous2004-12-25 11:37
>>8
stock performance perhaps
google runs highly modded php
and yes, its very fast to slap toghether... php
Name:
2004-12-25 12:03(capped)
Shiichan is the definition of very quickly slapped together PHP :v
Name:
Anonymous2004-12-25 12:13
phps motto: whatever works
ke ke
Name:
Anonymous2004-12-25 15:24
Perl is for people who like writing beautiful, artistic code that will serve as a testament to their creativity for generations.
Screw those people, I just want to be able to read the code and know what it does.
We are >>1's courtiers. We are sorry that our lord has opened such a stupid THREAD.
After the last war we had completely lost, our lord got mental illness. Everyday, he kidnaps girls from the village. Every night he gets drunk and tries to chop courtiers with his katana.
Now the lady of the house is ill in bed. The people in our country are suffering badly from famine. The neighboring Daimyos is taking advantage of this situation, they try to pass across the border and take over our land.
Quite a few of our fellow courtiers have intention to rise in rebellion.
We are now in dire straits. Our clan would be destroyed.
But, don't worry. We arranged that our Lord become a Buddhist priest.
In his way to the temple, our skilled assassin should take his life.
That is arranged perfectly. After that we will hail Master Monaminokami, the nephew of our lord, as our new lord. We, all courtiers, would do our best to serve this new lord with faith.
We apologize for any inconvenience our lord may have caused you.
Pleas wait for a while. Pleas forgive the evil deeds done by our lord.
PHP is a plain ugly hack. It's inconsistent, filled with an unholy number of functions, and the runtime is poor.
If you need a quick webpage maybe it'll do, but comparing it to a Real Language is a joke.
Name:
Anonymous2004-12-26 3:40 (sage)
its specific to web - hackish by definition, no one claims its a 'real' language
Name:
Anonymous2004-12-26 4:59 (sage)
Tell that to the PHP developers.
Name:
Anonymous2004-12-26 6:45 (sage)
>>25 use the language thats suited for the purpose
web is php
Name:
Anonymous2004-12-26 7:02
what ever works best. use it. whocares if its teh h4x or not. cgi where cgi is due, php if php will do or javascript where the monkeys are down you through wonderign why you havnt done any changes you were supposed to do 10 years ago.
Name:
Anonymous2004-12-26 14:57
>>18, there's a time for expressing yourself, and there's a time for getting work done. On a large project, "creativity" can be overdone.
>>23, Perl is a plain ugly hack too, yet it is apparently considered the god of all programming languages (unless you are Scheme/Ruby/Ocaml/PATH mark). I guess ugly hacks age like wine sometimes.
Name:
Anonymous2004-12-26 15:05 (sage)
Perl _is_ an ugly hack. But it sure beats PHP in syntactic beauty. Anything beats PHP.
Of course we could all wax on why nobody uses Scheme/Ruby/OCaml, but that's life.
Name:
Fnordulicious2004-12-26 15:51
Perl is the only language which can parse Perl.
It doesn't get any worse.
Nuff said.
Name:
Fnordulicious2004-12-26 16:01
BTW, all scripting languages are toys. If it doesn't compile to machine code better than can be written by hand, the language is a toy.
Name:
Random Anonymous Fucktard2004-12-28 17:52 (sage)
Are the functions touching?
Name:
Zzzzz2004-12-28 22:44
Bah, I use php AND perl every day. And Java.
Java's great if you're writing a huge app. If you're writing a three-liner, there's nothing like taking 15 damn minutes turning it into a class and filling in all the other crap to make it a program.
Perl's great for quick and dirty stuff but DBI is a nightmare. I guess when you try to have a single interface to every database possible, it has to be the lowest common denominator. At least with the mysql_* (or in my case, pg_*, though this could be a thread of its own) I get to use the full power of my chosen database. DBI can't even do large data blobs properly.
If I'm not using a database, its embperl all the way. All the inline code goodness of PHP, but with perl as the language.
Name:
Random Anonymous Fucktard2004-12-29 3:43 (sage)
That may be true. But that's similar to how we used to code down to the metal, with all its problems (and benefits). Now days we use drivers with uniform APIs instead.
I suppose if the target platform is fixed for the foreseeable future it doesn't matter.
DBI with extensions. That might be amusing.
Name:
PassiveSmoking2004-12-29 6:10
Anyone here tried Python? I do PHP as a living but I have heard good stuff about Python too.
Name:
Zzzzz2004-12-29 7:45
I've "played with" python, and after you get over the strict indentation laws it's a fairly pretty language to code in, but I haven't come up with something to actually write in it, so I haven't tried it for any kind of application.
Name:
Aborn!2004-12-29 8:02Aborn!
Aborn!
Name:
Anonymous2004-12-31 15:05
Script languages are script languages, but still cold fusion hurts my lazy fingers more than php. It might even be "better", but its a damn lot to write ><
Name:
Royston2005-01-03 12:16
PHP is what it is, A simple web application scripting language.
Its good for what its ment for, SQL data driven websites.
Name:
Anonymous2005-01-03 12:57
It's hard to beat PHP for simple web applications and content management systems alike. But, perl is more versatile because it works with non-web systems.
PHP was never designed as a general purpose language, but at the same time, it's not a proof of concept or instructional language either, which would appear to be the official definition of "toy language"
Also, I've heard languages that don't have a compiler written in said language are "toy" languages. PHP is not a compiled language, so this also does not apply.
That's my two cents.
Name:
Anonymous2005-01-27 22:17
>>61
that's an expression, not an equation :eng101:
Name:
Anonymous2005-01-28 8:45
>>61
I agree that saying "real men uses" is very, very wrong.
Name:
Anonymous2005-01-29 14:11
>>29
" Of course we could all wax on why nobody uses Scheme/Ruby/OCaml, but that's life."
Hey! I use Scheme all the time for making web graphics.
Name:
Anonymous2005-01-31 6:14
I DONT CARE SHIT, I JUST WANT A LANGUAGE THAT IS EASY, UNDERSTANDABLE, WORK AND FAST
Name:
Anonymous2005-01-31 7:20
It is probably the case that if you can't handle the grammar of your first language, you may not be quite cut out for the intricacies of a real programming language.
My personal experience: PHP = a good, powerful scripting language like Perl, without the crappy, insane, inconsistent syntax of Perl. Awesome productivity. Intended for web applications and serious/longer console scripts. Not intended for Doom 4, that's what C is for and it'll always be like this.
And for what it's good, it PWNS Java. By the time PHP_guy finishes his web portal and is now browsing 4chan in his spare time, Java_guy is still defining class BoardUserCalendarDataStreamStringLayerBufferedInputHandler and wrote 10000 lines of unproductive OO trash. Sure, it's reusable code. You can "easily" transform your image board into CD burning software, a screensaver, or a soccer simulator, beacuse it's all OO. Maintenance is a snap, you only have to navigate through 800 classes and interfaces to find the piece of code you want. That's "information hiding", after all! And it's conceptually right. For example, y=f(x) is clearly not a function, but a method of an abstract mathematical object. And so on.
So this is what I do:
- Quick hacks: Perl.
- Web and fine scripts: PHP.
- System applications and serious non-web stuff: C.
Name:
Anonymous2005-02-06 8:07
>>17
here's what i do:
quick web hacks: PHP
command-line scripts and larger web scripts: perl
other stuff: C
Because I don't worship OO as everybody else does? Or perhaps because you consider something not OO, not running on a 10+ meg abstraction layer, not using a 2 GB application server, and not using XML even for the about box is a toy (that'd make most of Linux a fancy one BTW)?
Friendly tip: Stop reading PC Magazine and doing whatever the big business guys do - they do it to validate their ludicrous budgets and timelines. Just save your time.
Yup, but it ended up being mixed C++, C++--, and C. I think it's a good choice though; you OO what's OO and not-OO what's not-OO. I still prefer traditional, structured, modular, intelligent programming though.
Name:
Anonymous2005-02-08 16:34 (sage)
C++--? What?
And how do you get mixed C++ and C? C++ is a superset of C, you don't "mix" it. You using C99 or something?
"C++ is a superset of C" --- Of course, I meant I was using mixed OO and non OO (pure C) data structures and methods/functions. Part of it was OO, and the main program which wasn't used it.
C++-- is what we had before C99... all the cool stuff introduced in C++, like operator and function overloading, but sticking to traditional structured programming.
PHP = a good, powerful scripting language like Perl, without the crappy, insane, inconsistent syntax of Perl. Awesome productivity. Intended for web applications and serious/longer console scripts.
I'm not sure if the part where you think PHP is consistent is funnier, or the part about using PHP for console scripts.
Lol. I'm not religiously devoted to PHP, I just found it useful and saved hours with it compared to what I was using, and thought I could share this experience. The day I bump onto something more productive or anything I like better I would have no problem to switch.
Name:
Anonymous2005-02-12 5:04
ruby =O
Name:
Anonymous2005-02-12 7:49
>>84
That's fine; whatever works for you. Just be careful about sweeping generalizations. Your use of "relatively" twice indicates you're aware your argument is standing on thin ice.
For the record, I believe PHP is more consistent than Perl. PHP suffers from a morass of function though, and those are far from consistent.
Could you clarify your reason for disliking Python? I enjoy it enough that my only experience with PHP is debugging scripts that will tide me over until I have time to rewrite them in Python CGI.
Then again, I'm of the "If it's not a worthwhile option for non-web applications, then why should I trust it for server-side scripting enough to spend time learning it?" school of thought.
Name:
Alfarin2005-03-02 3:24
I've used both php and perl... and I'd have to say, each to their own preference... sure, perl is much more powerful than php in some ways, but it is also a massive memory whore... and if you're doing web applications, memory whore is no good... so that's where php kicks in... light, fast, and robust... You CAN also do OOP with php... its just slightly more annoying... but none the less, its not impossible.
PHP and Perl have different strengths, but I certainly hope that wasn't your reason for choosing PHP.
Name:
Anonymous2005-03-05 18:39
Perl = Executable Line Noise
Do I need to say any more?
PHP does a damn good job at what it does. Perl has been "adopted" to do stuff it was never designed for.
<b>Trivia Question</b>: What does PERL stand for?
...yeah, I thought that'd clear up a few things.
>>70
Object-Oriented programming is not the enemy. It is a beautiful paradigm for designing large software systems. But of course, it shouldn't be abused.
You know you're opening a whole new can of worms with that one. Prepare for a lengthy essay on the correct capitalization of Perl and how it's not really an acronym, etc etc. :P