News for hackers. Stuff that matters.
Re:Build command line apps using PHP 7 by astrodust on Sunday September 03, 2017 @04:57PM (#15163865)
How is C-like syntax a plus?

I know Perl, C, C++ and PHP quite well, but I'd never, ever call C-like syntax a plus.

It's astonishing how feeble modern PHP is, that to comapre strings you often have to use strcmp. In 2017. It's like all the cruft of ANSI C with a whole bunch of $ characters spiked in.

Re:Build command line apps using PHP 7 by wongarsu on Sunday September 03, 2017 @06:14PM (#15164252)
>How is C-like syntax a plus?

C-style syntax is fairly popular [1]. If it had lisp syntax or haskell syntax most people would complain that they can't figure out what's going on without learning all that syntax.

>that to comapre strings you often have to use strcmp

For equality === works just fine. For < and > there is no one obviously correct order, so it's entirely reasonable to use functions for that.

1: https://en.wikipedia.org/wiki/List_of_C-family_programming_l...

Re:Build command line apps using PHP 7 by TazeTSchnitzel on Sunday September 03, 2017 @05:50PM (#15164129)
> How is C-like syntax a plus?

Well, versus whatever abomination bash uses, it's quite readable…

Re:Build command line apps using PHP 7 by astrodust on Sunday September 03, 2017 @07:20PM (#15164543)
Also better than M4, but this is not really a high bar.
Re:Build command line apps using PHP 7 by justbaker on Sunday September 03, 2017 @04:58PM (#15163874)
I'm dying in laughter here :) +1
Re:Build command line apps using PHP 7 by justbaker on Wednesday September 06, 2017 @09:06AM (#15183297)
> How is C-like syntax a plus?

It's the most common syntax pattern of popular languages. Statistically, more developers know a language with a "C-like" syntax than Lisp, Haskell, Erlang..