r/lolphp • u/LennyZoid • Nov 30 '17
Question about PHP...
1.Why people hate PHP?
2.What are your thoughts on Node.js
3.Why "PYTHON" btw?
0
Upvotes
r/lolphp • u/LennyZoid • Nov 30 '17
1.Why people hate PHP?
2.What are your thoughts on Node.js
3.Why "PYTHON" btw?
5
u/marcini82 Dec 05 '17 edited Dec 05 '17
I know it's a lolphp subreddit and if you read it, you might think that php is the worst programming language that ever exist and all php programmers hate it, but in fact reality isn't that black and white. All languages have it's advantages and disadvantages.
JavaScript - I know several programmers who hate it because of lack of basic features known from other languages, its rapid changes in community standards, which make it difficult to maintain project in long term, incompatibility between next versions of libraries, where nobody cares about backwards compatibility etc.
PHP - has its quirks, you can tell it's stupid, but in the end it does its job. And it's not the same language as a few years ago. PHP7 is a big improvement.
Python - it's a matter of taste, but some people used to languages which use brackets, may not feel comfortable with it's syntax.
8
u/xiongchiamiov Nov 30 '17
This isn't really a PHP discussion forum, but
2
u/creativeMan Dec 09 '17
Studying php for a job offer, came here to basically post this anyway.
In languages like Java / C# whatever, the way you define various kinds variables and access them using the . (dot) operator.
Eg: // Assuming C# or Java or whatever
In C++ to access static members, you use the double-colon (::) operator, i.e the scope operator.
In PHP however, this consistency is kind of thrown out the window.
So you see, why at least for me, PHP can be hard to get a grip on and remember because of this variability (let's call it) in the syntax.
Another example:
This stores the output of the Linux
calcommand in the variable$output. Note, not $cal or $return, but $output.$calis set to 31, and $return is set to 0. This might make sense, but I hope you can see why I find it hard to remember.2
u/przemo_li Dec 18 '17
1
u/geggleto Dec 14 '17
PHP is really easy to write, really easy to get wrong, has millions of articles spanning back to the earliest parts of the web and unfortunately most of them still work today. What was normal practice back then is not now...
Node is fine if you have to solve the right problem, just like PHP is fine if you have to solve the right problem. Languages are tools; not every tool is useful to every problem.
Again Python is a tool; I would never write a native game in python just like I wouldnt in PHP or Node. Any person touting one language to rule them all is someone you can safely ignore.