On Fri, Aug 9, 2019 at 10:40 AM Sergey Panteleev <ser...@s-panteleev.ru> wrote:
> As I understand, in P++ it was planned to drop the legacy code, Correct. > add new functionality Correct. > and painlessly implement BC. > Probably correct - but to phrase it more accurately - when we introduce P++ - we won't be bound by the same level of BC that we're bound by today - simply because migration would be opt in. > Who wants – migrates the PHP project in P++, who doesn't – continues to > use PHP. > Correct. Going forward, things begin to be less correct. P++ isn't "the future of PHP". It's something different, a sister language - that has a different philosophy. It's strongly typed, and has capabilities that many of the folks who want a more advanced/complex language appreciate. New projects, for example, will use P++ already. > Some will, some won't. There'll be plenty of new projects who will be written in PHP. And probably, plenty of new projects written in P++. Well, how is this different from the new version of PHP (e.g. PHP 9)? > It's very, very different. With this approach, even down the line in 2029, PHP remains PHP. None of us has a crystal ball to predict the future, but my guess is that WordPress will stick with PHP, and not move to P++. Based on feedback - Laravel (the most popular PHP framework) - will stick with PHP, and most probably many if not most of the new Laravel-based projects will do the same. If we stick with the current way of doing things, the tension between the strict camp and the dynamic camp (to oversimplify the distinction between them) are going to stay constant or get worse - essentially as many in the strict camp views the dynamic nature of PHP as 'legacy' (you're kind of alluding to that in your question). As much as it doesn't appear to be reflected on internals@ - there are TONS of people out there that like PHP's dynamic nature, and have absolutely no wish to become more and more strict as time passes by. Who wants – adapts his code for PHP 8/9 with all its BCs, who doesn't – > continued to use PHP 7/8. > No, that's not an option for a variety of reasons - for starters, it means that those who are unhappy with the direction the language is going towards, are essentially forced to leave it sooner or later - as they'd get no security updates, no performance improvements, no bugfixes, no new extensions, etc. Also, consider it a given that PHP has to stay a dynamic language. Making it exclusively strict simply isn't an option. Introducing strict while keeping the dynamic ones is an option - but it's a complicated one, and also entails inherent tensions - especially because many in the strict camp view this as a transition, and not an addition. The separation into two 'dialects' can provide a clean way for solving this long term. Because this discussion flows smoothly from a neighboring branch, let me > remind you that a few percentages of users who continue to use short tags > were discussed there. > I don't think that's relevant, but regardless - we have no data about how many people use short tags. 1% wasn't an estimate, it was just an illustration that even if it's 1% - it's a huge number of people. My guesstimate is that it's a lot more than 1%. > Perhaps the same percentage of users will remain in PHP instead of the > discussed P++. > No, not at all. There are a lot more folks who prefer the dynamic nature of PHP than folks who care about short tags. WordPress developers, Laravel developers - two of the biggest ecosystems in PHP (if not the biggest ones) - seem to generally prefer that. That in itself can easily be several tens of percents of the userbase. > Will the development of a new language be justified due to the few > percentages of users? > The ones who want to develop a new language aren't the ones in the dynamic camp. They're the ones in the strict camp. My proposal allows them to do exactly that, while living in peace with the dynamic camp. Zeev