Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have been doing a lot of work with PHP recently, and reading through their library docs, it seems to me like they will put anything in a core extension, regardless of whether it's something that really belongs there.


This isn't a core extension, it's a PECL extension--see http://pecl.php.net/package/v8js. PECL extensions are not distributed with PHP. You have to explicitly install them if you want to use them.

I think sharing code is always better than not sharing code. If you run into a use case where this would be useful, then you can just grab it and install it.


> I have been doing a lot of work with PHP recently

If you've been doing a lot of work in PHP recently, then you should be compiling your own PHP. Which gives you the option of disabling every extension. The PHP core is actually very lean. Virtually everything is an extension. They even have a nifty flag to disable everything.

I like having the option of compiling a bazillion extensions in the binary if I want to. Even though I never enable anything beyond the basic stuff I need.


Stuff like this with PHP just reminds me how nice the module loading systems other languages use to handle this sort of thing.*

PHP - forgot something? Best re-compile so I can access the module's massive list of global functions.

Python, Ruby, Node, etc. - `import/include/require module`

* because Pear is basically a waste of time.


What?

Have you tried to install something using pip for Python? How about npm for Node?

Those package management programs compile stuff on your system all the time. Same as PECL extensions.

The ecosystem for Python, Ruby, Node works exactly the same as it does for PHP. Please leave your random PHP hatred at the door.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: