by Kilimanjaro · 14y ago · 0 comments
There, a perfect opportunity for language designers to shine. Nothing fancy, just fork and fix. No need to come up with new paradigms. Nothing to make you sweat. Just fork the damn thing and fix the warts with a scalpel.
It is and will be the most used language for web development. If that is not a shiny medal in your chest and a place in history books, I don't know what is.
Any takers?
Drop the dollar
Use + for str concat
Use . for class members
Use . for dicts
Use . for namespaces
Use : for key:value pairs
Fix needles and haystacks
Use camelCase for functions
Use arrays and dicts literals
Use list genereators
Use request and response objects
Objectify strings, lists and dicts
While most of it is syntactic sugar, this will solve 90% of the problems for 90% of the people.Feel free to add yours.
Of course these things will all happen in time if the fixed version takes hold. But if you're willing to throw out PHP and start anew, you can have all of the above right now by learning Node, Rails, Django, etc.
I think the comment above about needing a Jeremy Ashkenas (that is, a CoffeeScript for PHP) is the only realistic way for a "fixed" PHP to succeed. There needs to be a smooth transition, and a FixedPHP-to-PHP5 compiler could provide it.
- Stop trying to turn PHP into another language. Millions of developers are perfectly fine with its syntax, deal with it.
It is not about making it a completely different language, just about simplifying it, making our lives easier.
What's wrong about dropping the dollar sign for variables?
What's wrong about objectifying a string so our editor can popup all string functions on 'name'.?
What's wrong with using key:val instead of key=>val?
Saving one char at a time is a win, we are lazy beasts, you know it.