4 ms·
It's not just the experience. Languages like Ruby and Lisp tend to be a lot more concise and have more functionality than PHP, so it's more like comparing a blu
by weavejester 18y ago
It's not just the experience. Languages like Ruby and Lisp tend to be a lot more concise and have more functionality than PHP, so it's more like comparing a blunt knife to a razor sharp one. You can still cut with a blunt knife, but it takes longer and is harder work.
- breck 18y agoI would argue that PHP and the LAMP stack have more functionality than any other language by an order of magnitude when you're talking about web development tasks. For anything else, PHP is pretty much irrelevant, but when you're doing web development, it's definitely the swiss army knife. Without a single import or require, you can send emails, query a database, download a web page, handle session data, get post variables, etc. You've also got file access, date and time functions, regular expressions, the list goes on. What more functionality could you need for a web app?
- cturner 18y agoIt's interesting that you think in terms of web app. I generally think in terms of data model, and then web app is a structure on top of that. Much of my background is in delivering complex web applications with no javascript or other fancy stuff. Previous customers have wanted lots of functionality in as few (and fast) page reloads as possible, with lots of reporting on each page. This results in a small number of mega pages backing onto a 'Service Layer' which in turn sits on top of a schema. Multiple applications can be hooked into the domain model to preserve data integrity. I'm not as strong as many geeks I know at keeping complex things in my head. My experience of PHP (I've shipped apps from 3.0 to 5.0, but I've never invested enough time to know it well) is that it has weak language structures and weak object relational modelling capabilities - this makes it difficult to manage the sorts of complexity that I've encountered. For anything else, PHP is pretty much irrelevant, but when you're doing web development, it's definitely the swiss army knife. By way of comparison - in python there's a http interpreter in the standard library that you can bind to a webserver in seconds, and you can write a simple templating library in a couple of minutes too. It's got XML-RPC in the stdlib too that makes it ridiculously easy to offer services to other applications. Perl has similar stuff via cpan, ruby via rails. What more functionality could you need for a web app? I've found powerful object modelling to be critical. The Java platform has always been strong in this. One thing that is nice about PHP is that you instantly get to the point that you change something and then reload - bang you can see your changes. CGI approaches aside, that's not such an easy point to get to with the other languages I know.
- weavejester 18y agoI tend to think in terms of language design, so by "functionality", I meant it in terms of syntax, rather than external libraries. Sorry, I should have been more clear.
- Kaizyn 18y agoYou're kidding right? You're claiming that Lisp has more 'functionality' than PHP. By functionality, do you mean standard library? Or do you mean core language? Elegance != more functionality.
- KirinDave 18y agoUsually people talk about Lisp's superior expressiveness. The ability to "draw down" (or up) a language to the concepts you're working with directly is a powerful thing, and very few languages do that as well as lisp. Maybe that's what he meant? "Functionality" of a language is kind of a vague term.
- weavejester 18y agoMy apologies, "functionality" isn't a very precise word in this case. I meant it in terms of what functionality is in the language's syntax. For instance, Lisp has macros whilst PHP does not. And whilst later versions of PHP do support things like first class functions, they do so in an unwieldy and verbose fashion that negates a lot of their advantages: #(* n %) (* n _) (* n) function($x) use ($n) { return $n * $x; } One of these things is not like the others :)