Hacker News new | ask | show | jobs
by throwaway888abc 616 days ago
>Organized Library PHP's massive library (2,000+ functions) is curated and organized into modules & classes.

// PHP in_array('needle', $hayStack)

// THT $hayStack.contains('needle')

This looks more or less like a new language ? It must be amazing amount of time and energy to rewrite PHP in to this.

I don't see the benefits. I understand the Facebook's HHVM had some. (https://hhvm.com/)

Or Swoole (https://openswoole.com/) has it.

But i'm not clear of THT (also typical apple vs oranges benchamrkTM included).

2cents

1 comments

Thanks for the comment.

The benchmark might seem like apples-to-oranges, but they both do templating & routing, which is what is being tested.

I also address this on the benchmark page:

Why compare a language to a framework?

1) THT takes a “batteries included” approach by providing essential web framework features.

2) Some might be worried that running a transpiled language would be too slow to run in production, and Laravel is arguably the best example of a production-ready PHP framework.

Also, yes it is essentially a new language. I don't expect anyone to rewrite large PHP applications in it, but people might consider it for new projects.