Live data from Hacker News

PHP needs to die. What will replace it?

seldo.com

141–150 of 160 posts

Re: PHP needs to die. What will replace it?

#141

Earlier quoted context omitted.

It really depends on the beginner I guess. It seems like what kemayo is saying is that there are beginner programmers and then there are people who don't want to be a programmer at all really, but might like the idea of having a dynamic year string printed in the footer of their page. Those of us who have been working with computers for a long time - particularly those of us who write code - too easily forget what it…

From the perspective of the "average" professional programmer with a CS degree the vast majority of all programmers, even those who get paid to do it, are rank and utter beginners. Most programmers cannot solve fizzbuzz. Most programmers don't grok recursion, and have trouble with iteration from time to time. If you were to look at a graph of # of programmers within different skill level bins the "beginner" bin would…

Well said. Your second paragraph expands well on what I was thinking when I said we forget that beginners have a different idea of what 'trivial' means. The MVC concept (for example) might be trivial to those who get it, but it's likely seen as undesired friction by the beginner, while simultaneously being a good next step for them to acclimatise to should they be wishing to progress. Something that better facilitates this - or things like it - than what we currently have would be great.

Re: PHP needs to die. What will replace it?

#143
post #86
post #40

Earlier quoted context omitted.

I take it you have never tried to get major changes to core server infrastructure approved at large bureaucratic institutions. Writing your code in php is often orders of magnitudes faster, easier and cheaper than getting a decent RoR setup installed.

That's your experience, and highly subjective. And yes, I deploy code to dozens of enterprise servers for a global company. And that company is looking into Rails, not PHP.

My point isn't so much rails vs php, but about the non-technical difficulties in getting major infrastructure changes done (especially if it's for a minor project) . I'm sure it'd be equally hard to get a ASP.NET MVC stack set up at a company with a big RoR setup already in place.

Re: PHP needs to die. What will replace it?

#144
I'm mainly a Python programmer now but used to use PHP fairly extensively. I defended PHP for its ubiquity and how easy it is to get started using it until I saw what was going on with the development of PHP6. That's pretty much when I decided that, personally, it's no longer a language worth investing in.

Re: PHP needs to die. What will replace it?

#145
post #86

Earlier quoted context omitted.

That's your experience, and highly subjective. And yes, I deploy code to dozens of enterprise servers for a global company. And that company is looking into Rails, not PHP.

Looking into rails? What are they using currently?

.NET, like most enterprises, afaik.

Re: PHP needs to die. What will replace it?

#146
post #115

Earlier quoted context omitted.

No basic string manipulation, only RE-based stuff. One-based indices instead of zero-based.

> No basic string manipulation, only RE-based stuff It's trivial to write, there are lots of libraries that do this. I've worked on a lot of string processing code in Lua. It's not as easy as Perl or Ruby but it's not by any means hard. > One-based indices instead of zero-based. Other than violating the expectations of people used to other C-like languages, this is not in any way even remotely a problem. I don't know…

These are pitfalls and usability concerns. Languages that make you actively work against the nature of the language are not good; programming languages should be making this stuff easy.

One-based indices stop being a "minor detail" as soon as you realize that out-of-bounds indexing doesn't fail, but returns nil. Time to re-examine all of your code. Combine this with the natural mathematical awkwardness of one-based indices and it can get really frustrating, really fast.

I had to do Lua for some game design stuff a few years ago, and these were the two things which stuck out at me almost immediately and bothered me during the entire ordeal. Maybe I've been spoiled by Python, Perl, Java, C++, C, and other languages, but it's deeply frustrating how wrong Lua is about this.

Re: PHP needs to die. What will replace it?

#147
post #115

Earlier quoted context omitted.

No basic string manipulation, only RE-based stuff. One-based indices instead of zero-based.

> No basic string manipulation, only RE-based stuff It's trivial to write, there are lots of libraries that do this. I've worked on a lot of string processing code in Lua. It's not as easy as Perl or Ruby but it's not by any means hard. > One-based indices instead of zero-based. Other than violating the expectations of people used to other C-like languages, this is not in any way even remotely a problem. I don't know…

These are pitfalls and usability concerns. Languages that make you actively work against the nature of the language are not good; programming languages should be making this stuff easy.

One-based indices stop being a "minor detail" as soon as you realize that out-of-bounds indexing doesn't fail, but returns nil. Time to re-examine all of your code. Combine this with the natural mathematical awkwardness of one-based indices and it can get really frustrating, really fast.

I had to do Lua for some game design stuff a few years ago, and these were the two things which stuck out at me almost immediately and bothered me during the entire ordeal. Maybe I've been spoiled by Python, Perl, Java, C++, C, and other languages, but it's deeply frustrating how wrong Lua is about this.

Re: PHP needs to die. What will replace it?

#148
post #115

Earlier quoted context omitted.

> No basic string manipulation, only RE-based stuff It's trivial to write, there are lots of libraries that do this. I've worked on a lot of string processing code in Lua. It's not as easy as Perl or Ruby but it's not by any means hard. > One-based indices instead of zero-based. Other than violating the expectations of people used to other C-like languages, this is not in any way even remotely a problem. I don't know…

These are pitfalls and usability concerns. Languages that make you actively work against the nature of the language are not good; programming languages should be making this stuff easy. One-based indices stop being a "minor detail" as soon as you realize that out-of-bounds indexing doesn't fail, but returns nil. Time to re-examine all of your code. Combine this with the natural mathematical awkwardness of one-based i…

Lua is not perfect. But saying you shouldn't use it because of 1-based indexes is an overreaction.

> Maybe I've been spoiled by Python, Perl, Java, C++, C, and other languages

Probably. :)

One of Lua's main goals is to provide a language easy for beginners to use for small tasks. This affects its design in some other rather annoying ways (like for example, variables being global by default rather than local) but they were pretty carefully made decisions.

The context of this thread is, "what could be a good replacement for PHP?" I think because Lua aims to be easy for inexperienced programmers, it's a rather good choice, even if some of its characteristics can be surprising or annoying to established developers experienced with other languages.

Re: PHP needs to die. What will replace it?

#149
post #130

Earlier quoted context omitted.

The problem is not that "two different dudes implemented it. At different times. Probably, from different continents. They didn't notice it at the time". Is is that it was allowed to be added to the core library without it being questioned and fixed before it was too late to fix for compatibility reasons. That is the ultimate problem. I would rather a language or framework or library move slowly and correctly than ad…

You're not getting what I'm saying. Even if you are super careful, mistakes will be made. What's important is how you deal will them once they're there. PHP chooses to be ugly, over shafting its user-base by deprecating shit left and right. I like that. It tells me I can use it in a production setting.

I do understand what you are saying though for the same reason, it makes me not want to use PHP in a production setting. The fact that the core developers are willing to add things without thinking them through forcing the users to deal with problems that can't be fixed so as to not break existing sites concerns me.

Re: PHP needs to die. What will replace it?

#150
post #110
post #104

Earlier quoted context omitted.

Note that python3 still doesn't have widespread adoption, because there are still widely used libraries lacking support for it.

But in the coming future it will. All major libraries and frameworks are going to port over to python 3. But we are missing the point here. PHP could need a cleanup from the ground up even if they have to break a lot of stuff this could help the language to evolve.

"But in the coming future it will. All major libraries and frameworks are going to port over to python 3."

Don't bet on it. It has been too many a years already, and no dice (or minimal dice)

Post reply on HN