3 ms·
> Writing PHP requires to you memoize random shit like the fact that json_encode() accepts options via bitmasks Several other functions use bitmaps. It's a con
by jtreminio 7y ago
> Writing PHP requires to you memoize random shit like the fact that json_encode() accepts options via bitmasks
Several other functions use bitmaps. It's a convenient way to string multiple options together without needing to pass key:value arrays. It's in the manual. My IDE typehints this for me. It's well documented. If you're surprised by this it's because you're using a text editor. Do folks write c# outside of Visual Studio? I can imagine some people might enjoy writing Java in notepad.exe but that's simply not for me. Why would I subject myself to this? Why make programming harder than it need be?
> - Imports/namespaces are not explicit (no intuitive way to know what methods are being provided by a given import without diving into it's file)
So you need to know ... what you're importing. This is difficult for you? If you don't want your IDE to typehint on the namespace, you need to open the stuff you imported. Honestly, you're reaching.
> - Variables are all declared in global scope by default
I don't understand why you would think this is unique? Any variable declared in the global scope is ... global scoped?
https://playcode.io/317387?tabs=console&script.js&output https://playcode.io/317387?tabs=console&script.js&output
If you look at RoR, running `rails server` spins up a webserver using Puma. Why wouldn't RoR use whatever built-in webserver Ruby ships with? I admit I am not as knowledgeable in Ruby or Python as I am in PHP, but what I do know is that a 5 minute Google search shows me that very few places on the internet recommend exposing Ruby or Python directly to the internet, and instead Unicorn, Passenger, etc are recommended.
Why is this even a point of contention for you? Why would you think doing this, or being able to do this, would be a positive?