New language on top of PHP?

前端 未结 12 1735
甜味超标
甜味超标 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 02:45

    I'm like 8 years too late, but I'll answer anyways for anyone else who stumbles upon this.

    Hack is a language developed by Facebook to deal with some of the issues of PHP, since Facebook had a large PHP codebase. Hack adds some nice features on top of PHP such as gradual typing (what TypeScript has) and generics, among other features, and gets rid of some of the more dangerous PHP features. Hack was at one point a superset of PHP, but is no longer completely compatible after removing some of the worse PHP features.

    This is slightly different from what you were asking, since at this point Hack has its own interpreter, written by Facebook, but this started out as "better language that compiles to PHP", so I thought it was worth mentioning here.

提交回复
热议问题