Hacker Newsnew | past | comments | ask | show | jobs | submit | shakesbeard's commentslogin

Slack (canvas and huddles), Circle CI and Bitbucket are also reporting issues due to this.


Same. Clicked around. Was annoyed that a single click on an icon opened the window and not a double click. Used the navigation a bit and left.

No idea what they do.


That's literally how any representative democracy work, just at a different level? The Free State of Bavaria could say the same about the Federal Republic of Germany.


We've only made good experiences with layered architecture (onion architecture in particular, which is quite straight forward). We also never built it with the idea in mind to ever replace the storage engine. No, the big, big benefit has been that we can test everything without ever mocking a single class.

I also don't get the point about "going back to IoC" ... how is that mutually exclusive from using a layered architecture. This section was weird and didn't offer any good alternative.


> and now 20 years later we are still stuck with the same garbage.

and it hasn't been an issue ever. because all userland code lives in its own namespaces.


It gets messy real fast. I have seen horrible long namespaces ala java all over the place. It only leads to bad design. Having no way to force things.

PHP messed up pretty big when they made this ad-hoc namespace thing.


That's just not true. It's not JS. Composer will install exactly one version of every package. If your dependencies have incompatible dependencies themselves, then Composer will refuse to install the package. And this fact has led to PHP packages actually being maintained and kept compatible with each other. Of course, sometimes you run into dependency issues, but it's worth it because you'll always have quite clean, flat and small vendor directory. Compared to the node_modules horror it's great for maintenance.


This can definitely be an issue and it was when Guzzle released a new major version every month.

Also when working with projects that are 10+ years and lines of codes a million you will run into this. Sure you can always fork and move the library to another namespace, but that is extra work.

Modules are vastly superior to namespaces, with modules it is the caller that decides the symbol, with namespaces it is the callee.

Another problem with namespaces in PHP is that you can’t put anything into it, like a variable, it is not like namespace in C++. Namespace in PHP is just name added to the class or function name, kind of fake. Don’t get me wrong, it was a pragmatic solution to a real problem and it worked for what it tried to solve, make it easier to share code.

Modules could be elegantly solved in PHP by reusing the internal concept for a class (how it is with enums and interfaces)

Modules would also make it easier to unit test code, because you will not need to worry about a symbol already have been loaded and can’t get unloaded.

With that said I don’t think it the most important feature to focus on, there are others that give more bang for the buck, like string templating and operator overloading.


So PHP forces you to put everything in class? Thats hilarious!


Yes, because functions can’t be autoloaded and you can’t put variables and constants inside a namespace. But it isn’t hilarious, it is because of legacy.

Now there are proposals to fix function autoloading but it won’t fix variables and constants.

One way to do it better is to implement modules.


That's why every serious PHP programmer is using a static code analysis tool nowadays.

It would easily catch this. https://phpstan.org/r/a827ff45-4ee2-4bee-8ae0-935832e627b3


Yeah, but that's not a fair comparison. Toyota alone has 40 hybrid models. Tesla has like 4 ...

Here's some stats from 2022 and Tesla was 15. in total car sales. [0]

[0] https://www.carlogos.org/reviews/worlds-top-selling-automake...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: