News for hackers. Stuff that matters.
Re:PHP 7.1.0 Released by rpeden on Friday December 02, 2016 @08:33AM (#13088385)
To cover the cases where I want to use something a bit cleaner while still interacting with the PHP ecosystem, I've been using Haxe and compiling it to PHP. I've found that it works quite well; it compiles into nice, readable code. I actually don't mind PHP 7+, though. It's much more pleasant to work with than it used to be.

The bits of code that talk to native PHP functions will be platform specific, but I've been building up a little library of utilities that work with Haxe's other compilation targets - mainly JS, C++, Python, and C# for me. I've been especially impressed with its Javascript generation - it emits very readable and understandable JS, and its dead code elimination is quite smart; if you import a library and only use one method from one class, that's all you'll get in your compiled code.

Re:PHP 7.1.0 Released by egeozcan on Friday December 02, 2016 @09:29AM (#13088748)
After reading your comment, I gave Haxe another look. Actually, I don't remember why I didn't use it in the first place. I'll perhaps give it a go.
Re:PHP 7.1.0 Released by rpeden on Friday December 02, 2016 @10:38AM (#13089422)
It's worth a try! If you're looking for a good editing environment for it, There's a good VS Code Haxe extension that works well - it has code completion and a few other nice features.

And if you're ever unhappy with the language and want to jump in and wrangle the syntax tree yourself, it has a decent macro system.