Welcome Guest, Not a member yet? Register   Sign In
Property type hints in Codeigniter 4 (or just PHP 7.4 as a requirement)
#12

(This post was last modified: 01-21-2020, 08:31 PM by JNapolitanoIT.)

(01-21-2020, 06:55 PM)includebeer Wrote: @JNapolitanoIT I think you give too much importance to the PHP version number. In my opinion, what makes a framework interesting for future users is not the minimum PHP requirement but all the combined features it offers. Including some backward compatibility. Iā€™m certainly not saying CI4 should support PHP 5.x. But if it always require the bleeding edge PHP version at each new release, it can also be a deterrent.

This goes much deeper than just a version number. This more importantly lies within the features released under these versions. For example, just in PHP 7.4 we now have preloading. Preloading a framework can increase its performance significantly. Up to 25% for base Laravel applications.

Also, included is the ability to use the spread operator in arrays, thus removing the need to use native array_merge() function calls and allowing for faster script execution since compile time optimization can be performant for constant arrays. In turn allowing for a more optimized application.

And, the topic of this discussion has started with this, typed properties. With these, the core developers can not only allow for a more concise requirement of the framework but it also allows the underlying language to throw errors that can then be caught, when these features are used incorrectly.

These are just a few things that we could expect to have a significant impact on the frameworks performance if used appropriately within the codebase. The need to be conservative with the features is paramount. And while I understand the deterrent of having too high of a requirement, I can't justify this. I don't decide to use something due to its high/low requirements. I use something because of its availability, maturity, community, speed, ease of use and of course what it brings to me that is of value.

CodeIgniter has been harassed and made fun of and discussed for many years due to its desire to stay within the confines of using stale technology. Why not try at least, where appropriate, to push forward and get people to take a serious look once again at this fantastic framework? Why stay in the past if there is no need to? Why follow the precedent of this development style? Mostly, why not take advantage of amazing features within the language when and where they make the most sense, allowing for a mature development of the framework itself? Also, nobody said it has to be bleeding edge, but it should try to take advantage of what it can, when it can and make the best of it where it can, however it can.

All this by the way is of course subjective, which is why it is good to have a discussion Smile
ā€œA reader lives a thousand lives before he dies. The man who never reads lives only one.ā€
George R.R. Martin

Reply


Messages In This Thread
RE: Property type hints in Codeigniter 4 (or just PHP 7.4 as a requirement) - by JNapolitanoIT - 01-21-2020, 08:14 PM



Theme © iAndrew 2016 - Forum software by © MyBB