News for hackers. Stuff that matters.
Re:Build command line apps using PHP 7 by NightlyDev on Sunday September 03, 2017 @05:37PM (#15164066)
Just curious - what languages do you have in mind?
Re:Build command line apps using PHP 7 by SwellJoe on Sunday September 03, 2017 @05:57PM (#15164160)
JavaScript has gotten extremely concise in recent years, even with type annotations (with TypeScript or Flow). Perl with Moose/Moo is very concise. I dunno about Ruby or Python in terms of type annotations, but both have more concise class definition syntax. So, kinda all of the direct competitors to PHP have a more concise syntax for the same features.

But, maybe more importantly, this seems to be using classes where it makes little sense to use classes, but I see it a lot in PHP code. An idiomatic implementation of the same kinds of tools in JS/Perl/Python/Ruby might be shorter simply by virtue of not wrapping everything in a class. It's sort of an anti-pattern to OOP-all-the-things in those languages, while in PHP there seems to be a religious zeal for classes.