I've always said somebody should fork php and polish it, getting rid of all the backward compatibility issues and leaving intact the ease of use and deployment. It is unbelievable to me how nobody sees the huge potential it has in books, blogs, docs, frameworks, etc. Like giving php a second chance, this time done right.
Rasmus himself should give it a try as a side project with a different name. I would follow him from day one.
PHP has a lot of bad parts and, like javascript, is asking for its cup of coffee. The time is ripe.
Right now I am learning about compilers because if nobody does it, I will.
There are three opportunities right now in front of our eyes we are all missing: a simpler-than-node JS on the server implementation, a rectified php, and a simpler functional language for web development. Bonus point: a universal templating system, like jinja, for all programming languages.
As soon as I finish the course about compilers I'll jump head first to try to solve them all.
Is mustache.github.com not good enough as a universal templating language?
I don't agree with ever design decision made for the syntax, and I've not used jinja, but it has the universal part handled quite well.
The idea of a roasted PHP is interesting. It's not a no brainer in the way CoffeeScript is though. There's no real choice of language in the client-side, but there is on the server side.
Server side devs can just learn ruby/python/.NET/Scala. Client side devs are probs best switching to JavaScript or something very similar.
Mustache is good enough and seeing it ported to so many languages is cool. But I don't like it, I'll explain why:
I rather see a 'for' statement than imply that an object is 'loopable', or an 'if' instead of guessing if the var is boolean.
I rather see a differentiation between statements and variables like {% statement %} {{ var }} like in jinja.
I don't support the idea of logic-less templates. Everything in the right measure. Not a full-fledged language inside the template but basic loops and conditions I think are ok.
I am always complaining about syntax but I believe if it is too noisy or it makes me think about its meaning, it's too complex and should be simplified.
In the meantime, if you (or anybody) can point me to modern compiler techniques I'd appreciate it a lot. Been devouring all I can find online but nothing satisfies me.
What have you been reading that hasn't satisfied you? What are you looking for? The basics of parsing haven't changed much. . I'm still learning, too, so I don't know how much I can help.
As I've stated elsewhere on the thread, I prefer the idea of giving another language the ease of use of PHP. It is likely to be less work, especially in the case of Lua (super easy to embed in C). And the compiler is already built for you. :)
I've been reading mostly about lexers and parsers (antlr, yacc, bison, etc) that produce C code and would like to try different approaches like SML but haven't found any literature. Read also about LLVM but C++ is not my type. Haskell and GHC are cool but again C shows its ugly head.
So, I'd like to know if C is the only way or if there are new papers that I don't know of for implementing modern compilers before committing to C. I am just starting so there is a lot to read about different contexts and ideas.
Are you looking for an alternative to emitting C or to using C as the implementation language of the compiler? I'm not totally sure what you're after, and I'm a compiler noob, but I've been enjoying Appel's Modern Compiler Implementation in ML, which uses SML as the implementation language and emits RISC machine code or assembly (I think, I haven't actually gotten that far). I don't know how suitable it would be as a stepping stone to forking PHP, but it's something.
Personally, I've been using Python for prototyping. It has lots of lexing libraries, and from there I just do recursive descent. I figure I'll switch to C for a "real" implementation, partly because what I'm going for in my current project is as much database as programming language.
I don't think you have to use C++ to target LLVM. I think you can output LLVM IR from anything and then just call LLVM from the shell to get an executable.
Rasmus himself should give it a try as a side project with a different name. I would follow him from day one.
PHP has a lot of bad parts and, like javascript, is asking for its cup of coffee. The time is ripe.