Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You say if you make one assumption about C, you have to say the same about PHP. Well, PHP is academic, C is not. C is fast, PHP is not. I would only have agreed with your post if it were PHP and C++. C++ is academic and it's not slow but it is slower.

You also say that you either like both PHP and C, or you like neither. Well what about Lua, Python... or any other embed-able language? Most Python programmers would say they don't like PHP but love C, because the languages work well together, same with PERL as well. You could say that you either like both C++ and PHP or you like none. Maybe, because PHP can compile to C++ to become extremely fast, which is why Facebook and Yahoo both use PHP because it can be fast and it is well documented. It should not be compared to C though.

(Note: I contradict myself, PHP by itself is slow. PHP is not fast whatsoever. C++ is a low level language which is the only reason why it's fast and I think it's awesome that PHP can compile to C++. I'm in no way against PHP and I'm not encouraging people to stray away from the language. I was just pointing a simple error in this post.)



PHP is academic?! What definition of academic could you possibly be using?! The blasted thing doesn't even respect basic things like transitivity in its most commonly used equality operator, its author says that he hated programming and didn't know how to write a parser when he first implemented it. And the thing as far as I know doesn't have a specified grammar. It just disregards as much of the body of knowledge of computing as it can while still actually running on a computer.

If anything, C has a much more academic pedigree, being born in an industrial research lab and having /gasp/ an specification.


> PHP is academic

Uh... could you explain how you arrived to this assertion? Because as far as I can see, PHP definitely is not academic. The bloody thing started as a hodge-podge collection of Perl scripts, and to this day it still does not have anything even remotely close to a formal grammar. A language in which `foo()[1];` is a syntax error even though `$a = foo(); $a[1];` is valid code most definitely is not academic.


Actually, it's parsed with a rather simple yacc grammar. The reason why foo()[1] doesn't work is because it's a bad programming language, not because it doesn't have a grammar. It has one and it says not to parse that :)


Yes of course it's slow. It's interpreted and for 80% of sites out there that's fine. For the other 20% you compile the php down to C/C++




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: