Re: [Initial Feedback] PHP User Mo dules - An Adaptation of ES6 from JavaScript

From: Date: Fri, 28 Jun 2024 06:53:17 +0000
Subject: Re: [Initial Feedback] PHP User Mo dules - An Adaptation of ES6 from JavaScript
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-123982@lists.php.net to get a copy of this message
On 28 June 2024 01:16:24 BST, Mike Schinkel <mike@newclarity.net> wrote: > It may be an unpopular opinion, but I would argue that namespaces were optimized for > autoloading and the one class/interface per file paradigm I don't see any particular relationship between namespaces and autoloading, or any reason we need to throw them away to introduce different conventions for loading files. My opinions match Larry's almost exactly: I want package-level optimisation, and package-private declarations. But I don't want to rewrite my entire codebase to start using a completely different naming system. Not to mention that working with a combination of existing namespaced packages and "new shiny module" packages is going to be inevitable, so we can't just hand-wave that away. >1. Adding a module/package system to PHP with modern module features I find that "modern" often just means "fashionable". Please, let's be specific. What is different between imports and namespaces, and why is it a good thing? What specifically stops us doing all the things you've been discussing around loading, and visibility, etc, in a way that's compatible with the 400_000 packages available on Packagist, and billions of lines of existing code? Rowan Tommins [IMSoP]

« previous php.internals (#123982) next »