New language on top of PHP?

前端 未结 12 1733
甜味超标
甜味超标 2021-01-30 02:39

I\'m a PHP developer. I like PHP! It is a really good language if you know how to use it, but I know it allows very bad design sometimes.

It reminds me of JavaScript whi

12条回答
  •  既然无缘
    2021-01-30 03:03

    Heh, great idea. My thoughts, some contradictory...

    There are precedents for civilizing bad languages by putting syntax preprocessors in front of them.

    • In the early days of Unix, Fortran was popular and about the only portable language because most machines had no C compiler. But the vanilla Fortran of the day didn't even have block structured if-then-else, just a goofy single-statement if or an if-goto. So, the Ratfor language was implemented as a preprocessor for Fortran-66.
    • I believe there were (are?) Cobol preprocessors that presumably dealt with the verbosity and limitations of early Cobol dialects.
    • To this day Unix-derived systems ship with a macro processor called m4.
    • Several CSS preprocessors are available today, most notably Sass and LESS.

    But...

    • Just let it die, and the sooner the better
    • The problem isn't really in the syntax.
    • I don't see much of a JavaScript-PHP parallel. JavaScript is a great language. It's kind of the opposite of PHP.
    • I'm not sure why you say that PHP is a great language. It's one of the worst. Every decent feature is a patch or repatch in a recent version.
    • As you noted, there is a fixed-up version of PHP already: it's called Ruby and, as a language, it's near-perfect. There is another fixed-up version called Python. The world would be better off in the long run if we support the better systems.

提交回复
热议问题