Earlier quoted context omitted.
Plus there is PHP's aesthetics. I can't help but see all PHP code visually unpleasing. Programming isn't just a technical task. It's also an art like writing novels. I'm not satisfied when the code I produce doesn't look pretty, independently from the algorithm. In the article here, the Ruby code looks much cleaner to me than the PHP version, even though it's technically the same. Aesthetics is the main reason why I…
That really depends on what you're writing and how you are doing it. How is this php[1] code uglier than this python[2] code? [1]: https://github.com/laravel/framework/blob/master/src/Illumin... [2]: https://github.com/reddit/reddit/blob/master/r2/r2/controlle...
In many ways PHP is just now starting to come into its own
61–70 of 133 posts
Re: In many ways PHP is just now starting to come into its own
#62Earlier quoted context omitted.
I prefer rails specifically because the "hosting/running situation" for Rails is so FAR superior to that of PHP. $ git push heroku master ...done.
I don't really want to stand up for php, but this just isn't true. "git push heroku master" comes at a steep price. PHP hosting is, in general, ubiquitous, cheap, and incredibly easy. You can get comparable pricing for ruby hosting, but you'll be doing some server setup yourself.
Um... what? 1 dyno is free on heroku. You host it for nothing. Am I missing something?
Re: In many ways PHP is just now starting to come into its own
#63Re: In many ways PHP is just now starting to come into its own
#64The code example he gave in ruby and PHP demonstrate perfectly that the PHP version is verbose (not to mention that the ruby code isn't the most concise one). It could be just me, who, as a develop, is sensitive to every single unnecessary characters in the code, which happens a lot in that couple lines of php code.
$topic = $this->get('model.Topic')->find($topic_id);
$this->get('guardian')->ensureVisible($topic);
becomes this: $topic = Topic::find($topicId);
Guardian::ensureVisible($topic);Re: In many ways PHP is just now starting to come into its own
#65Earlier quoted context omitted.
Plus there is PHP's aesthetics. I can't help but see all PHP code visually unpleasing. Programming isn't just a technical task. It's also an art like writing novels. I'm not satisfied when the code I produce doesn't look pretty, independently from the algorithm. In the article here, the Ruby code looks much cleaner to me than the PHP version, even though it's technically the same. Aesthetics is the main reason why I…
That really depends on what you're writing and how you are doing it. How is this php[1] code uglier than this python[2] code? [1]: https://github.com/laravel/framework/blob/master/src/Illumin... [2]: https://github.com/reddit/reddit/blob/master/r2/r2/controlle...
Re: In many ways PHP is just now starting to come into its own
#66Earlier quoted context omitted.
Plus there is PHP's aesthetics. I can't help but see all PHP code visually unpleasing. Programming isn't just a technical task. It's also an art like writing novels. I'm not satisfied when the code I produce doesn't look pretty, independently from the algorithm. In the article here, the Ruby code looks much cleaner to me than the PHP version, even though it's technically the same. Aesthetics is the main reason why I…
That really depends on what you're writing and how you are doing it. How is this php[1] code uglier than this python[2] code? [1]: https://github.com/laravel/framework/blob/master/src/Illumin... [2]: https://github.com/reddit/reddit/blob/master/r2/r2/controlle...
The PHP code you linked to is basically a class with a bunch of getters and setters.
The Python code, on the other hand, handles numerous real-world HTTP requests that do actual work.
So it's not unexpected that the PHP code is lighter; it doesn't really do anything useful!
Although it helps implement a wiki system, the Python code is still very readable and comprehensible with minimal effort.
I think I know the point that you're trying to make, but those examples surely don't back it up in any way.
Re: In many ways PHP is just now starting to come into its own
#67Earlier quoted context omitted.
I don't really want to stand up for php, but this just isn't true. "git push heroku master" comes at a steep price. PHP hosting is, in general, ubiquitous, cheap, and incredibly easy. You can get comparable pricing for ruby hosting, but you'll be doing some server setup yourself.
"git push heroku master" comes at a steep price. Um... what? 1 dyno is free on heroku. You host it for nothing. Am I missing something?
Re: In many ways PHP is just now starting to come into its own
#68One of my main challenges with PHP is that it has no package manager with large community support. With npm and gem, and the community supporting them - developers get so much help in building robust products. Every developer that I've known for a few years and successfully switched from PHP to Node has said "Why didn't you tell Me about this before?!"
Re: In many ways PHP is just now starting to come into its own
#69Earlier quoted context omitted.
That really depends on what you're writing and how you are doing it. How is this php[1] code uglier than this python[2] code? [1]: https://github.com/laravel/framework/blob/master/src/Illumin... [2]: https://github.com/reddit/reddit/blob/master/r2/r2/controlle...
I'm not saying it really matters, but the PHP just looks ugly to me. I think it's all the dollar signs and braces.
There is a lot more to a language than its syntax.
Re: In many ways PHP is just now starting to come into its own
#70Earlier quoted context omitted.
That really depends on what you're writing and how you are doing it. How is this php[1] code uglier than this python[2] code? [1]: https://github.com/laravel/framework/blob/master/src/Illumin... [2]: https://github.com/reddit/reddit/blob/master/r2/r2/controlle...
I'm not saying it really matters, but the PHP just looks ugly to me. I think it's all the dollar signs and braces.
Special chars, like PHP $, Rust's ~, Ruby's @, help the programmer tell things apart easily.
Vastly better than having to keep the information in your mind after the declaration -- and much lighter and better than full-on hungarian notation madness.
As for the braces, they never went out of style. In fact, with the exception of Python, the languages that don't use them are not that popular, compared to the ones that do. Coffescript, for example, is insignificant compared to the plain Javascript use.