(06-14-2017, 06:02 AM)Kaosweaver Wrote: (06-13-2017, 12:40 PM)kharota Wrote: (06-13-2017, 11:20 AM)PaulD Wrote: Less code is not necessarily the best code (unless you are playing code golf).
Great code is beautiful because it is easily followed, clear, DRY, easily maintained, well thought out, robust and flexible.
Sir, if less code is same code why not use that one?
$this->load->view (has 17 chars)
Load::view (has 10 chars)
how many more hours i have to do (for simple thing) if i have to go through all loading and other stuff? time is money and as freelancer its even more costly.
I understand your point. are not we using frameworks to save our time?
If you're worried about 7 characters of typing, why not:
L::v
That's 4 characters, 6 less than your example.
Just make sure the time you save typing out 7 less (or 13 less) characters will make the code maintainable, readable, understandable and will actually save money (cause you've got to explain to every freelancer, developer, etc that, instead of using the default standard, we're doing it this way, standards exist for a reason, but if 7 characters are going to break the bank, by all means, go for it).
Frameworks save time because developers understand how they work and do not need to figure out, for example, how to display a view in the controller, they all know it is $this->load->view and they know it will work as expected without complication and for them needing to roll their own code.
Sir, first of all L::v is unreadable. Load::view is readable and understandable. I dont know its good or bad thats why I am asking the question here. Its not about just 10 Char and its not about just loading views. Its helps in autocomplete its easy to read and its cleaner in syntax thats the reason laravel is using such proxy classes to main classes.