by Kilimanjaro · 14y ago · 0 comments
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.