MagicalTux / goro

PHP in Go
BSD 3-Clause "New" or "Revised" License
689 stars 31 forks source link

Documentation on concurrency. #2

Open stewartmatheson opened 5 years ago

stewartmatheson commented 5 years ago

Would it be possible to update the project's readme to include information around how concurrency will be implemented? The readme mentions it however does not go in to any detail. Will concurrency be implemented at the language level as it is in golang creating a php superset or is the intention to make it an extension and override something like the pthread?

MagicalTux commented 5 years ago

This is still being considered and feedback on this is welcome.

Adding keywords to the language makes things easier to see, but can/will result in incompatibilities with existing PHP code happening to use the same names for other purposes.

Creating a separate extension allows the usage of PHP classes to expose concurrency and limits risks of creating incompatibilities with existing code.

It would also be possible via php.ini to have some things automatically fork in the background (for example generators).

Either way, at this point I believe more feedback from potential users is needed before deciding on a direction.

marcelloh commented 5 years ago

It would be nice if the php language stays as pure as it is now. An extension seems the best way, I think.

jarebear6expepjozn6rakjq5iczi3irqwphcvb commented 5 years ago

I second @marcelloh. Extension anything that goes beyond the current PHP spec.

marcelloh commented 5 years ago

Did you see this btw: https://github.com/syyongx/php2go. Could be helpfull