63

[RFC] Union Types v2 - Externals

 4 years ago
source link: https://externals.io/message/106844
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

[RFC] Union Types v2 Posted 1 year ago by Nicolas Grekasview source

unread

https://github.com/nikic/php-rfcs/blob/union-types/rfcs/0000-union-types-v2.md

Thank you Nikita, this would be a hugely welcomed step forward! Can't wait to get rid of all those docblock annotations!

I've some additional suggestions that would greatly help remove more docblocks and provide engine-enforced type-safety, maybe for the "future scope" section. We use the all in Symfony:

About union types with void in them, we do use one in Symfony: Command::execute() has "@return int|void". The reason is that if we were to use "?int" instead, the engine would force the community to add "return null;" where no return statement is needed at all most of the time. Right now, we consider that the transition cost for the community is not worth the extra boilerplate this requires. Note that there would be only one friendly path forward: trigger a deprecation when null is returned, asking ppl to add "return 0;". Not sure how this should impact the proposal, but I thought it could be worth sharing.

Thanks again, Nicolas

Posted 1 year ago by Matthew Brownview source
unread

https://github.com/nikic/php-rfcs/blob/union-types/rfcs/0000-union-types-v2.md

Thank you Nikita, this would be a hugely welcomed step forward! Can't wait to get rid of all those docblock annotations!

I've some additional suggestions that would greatly help remove more docblocks and provide engine-enforced type-safety, maybe for the "future scope" section. We use the all in Symfony:

About union types with void in them, we do use one in Symfony: Command::execute() has "@return int|void". The reason is that if we were to use "?int" instead, the engine would force the community to add "return null;" where no return statement is needed at all most of the time. Right now, we consider that the transition cost for the community is not worth the extra boilerplate this requires. Note that there would be only one friendly path forward: trigger a deprecation when null is returned, asking ppl to add "return 0;". Not sure how this should impact the proposal, but I thought it could be worth sharing.

Thanks again, Nicolas

Posted 1 year ago by Arnold Danielsview source

unread

Instead of using __toString as type maybe it's better to introduce a Stringable interface, similar to how __wakeup and __sleep are already superseded by Serializable. Of course __toString would still continue to work (for bc), but isn't usable for type hinting.

Arnold Daniels - Chat @ Spike [5acb3]

Posted 1 year ago by Peter Bowyerview source
unread

On Wed, 4 Sep 2019 at 12:30, Arnold Daniels [email protected] wrote:

Instead of using __toString as type maybe it's better to introduce a Stringable interface, similar to how __wakeup and __sleep are already superseded by Serializable.

I support that. I don't like the naming in string|__toString. string|Stringable is more readable IMO.

Peter

Posted 1 year ago by Dan Ackroydview source

unread

On Wed, 4 Sep 2019 at 10:59, Nicolas Grekas [email protected] wrote:

we use "@return $this" quite often. On the implementation side, I'd suggest enforcing this at compile time only (enforce all return points are explicit, and written as "return $this"

That's doing a deeper level of thing than a type system normal does.

It's enforcing the internal behaviour of a function, rather than just defining the type of the parameter that is returned.

if we were to use "?int" instead, the engine would force the community to add "return null;"

That sounds like a bug to me. The fact that null is returned by any function that lacks an explicit return value, is well-defined, and one of the most underrated aspects of PHP imo.

Arnold Daniels wrote:

Instead of using __toString as type maybe it's better to introduce a Stringable interface,

Although casting things to string is probably the most common use case, if you're going to think about an RFC along those lines, covering all of the scalars would probably be a good idea, as that would allow people to use specific types for values, that can then be passed easily to functions that expect a scalar.

function setRetryLimit(int $maxRetries) {...}

class ImageUploadRetryLimit extends int {...}

function processImage(ImageUploadRetryLimit $iurl, ....) { ... setRetryLimit($iurl); ... }

That type* of stuff is completely possible currently in PHP, it's just that it's a bit painful to both write and read.

cheers Dan Ack

*intended

Posted 1 year ago by Claude Pacheview source
unread

Le 4 sept. 2019 à 13:54, Dan Ackroyd [email protected] a écrit :

if we were to use "?int" instead, the engine would force the community to add "return null;"

That sounds like a bug to me. The fact that null is returned by any function that lacks an explicit return value, is well-defined, and one of the most underrated aspects of PHP imo.

This is an aspect of the eternal debate between explicit vs. implicit. In another recent thread, another aspect, namely variable initialisation, was debated. There is no “correct” solution, as it pertains much to coding style.

—Claude

Posted 1 year ago by [email protected]view source

unread

Le mercredi 4 septembre 2019, 10:26:09 CEST Nikita Popov a écrit :

As an experiment, I'm submitting this RFC as a GitHub pull request, to
evaluate whether this might be a better medium for RFC proposals in the
future. It would be great if we could keep the discussion to the GitHub
pull request for the purpose of this experiment (keep in mind that you can
also create comments on specific lines in the proposal, not just the
overall discussion thread!) Of course, you can also reply to this mail
instead. The final vote will be held in the wiki as usual.

Huge "no" from me on using github for discussing RFCs.

Huge "yes" on the RFC content.

  • Only supports "false" as a pseudo-type, not "true".

I think it would make sense to support true as well as I’ve seen a lot of cases of functions returning either an error string or TRUE on success.
So that would be string|true.

Brent Posted 1 year ago by Brentview source

unread

Hi Côme

Huge "no" from me on using github for discussing RFCs.

Care to elaborate why? The majority seems to like it. Though I am also curious about Nikita's experience with it, as he is the one having to process the feedback.

Kind regards
Brent

Le mercredi 4 septembre 2019, 10:26:09 CEST Nikita Popov a écrit :

As an experiment, I'm submitting this RFC as a GitHub pull request, to
evaluate whether this might be a better medium for RFC proposals in the
future. It would be great if we could keep the discussion to the GitHub
pull request for the purpose of this experiment (keep in mind that you can
also create comments on specific lines in the proposal, not just the
overall discussion thread!) Of course, you can also reply to this mail
instead. The final vote will be held in the wiki as usual.

Huge "no" from me on using github for discussing RFCs.

Huge "yes" on the RFC content.

  • Only supports "false" as a pseudo-type, not "true".

I think it would make sense to support true as well as I’ve seen a lot of cases of functions returning either an error string or TRUE on success.
So that would be string|true.

come@opensides.be Posted 1 year ago by [email protected]view source
unread

Le jeudi 5 septembre 2019, 12:04:55 CEST Brent a écrit :

Huge "no" from me on using github for discussing RFCs.

Care to elaborate why? The majority seems to like it. Though I am also curious about Nikita's experience with it, as he is the one having to process the feedback.

Because the PHP project should avoid depending on a privately owned centralized service for its technical discussions, and should not encourage (some would say force) people to use such platforms.

PHP is already on github but it’s only a mirror, the main git repository is at git.php.net .

Joe Watkins Posted 1 year ago by Joe Watkinsview source
unread

Because the PHP project should avoid depending on a privately owned
centralized service for its technical discussions

This is obviously your opinion, but you haven't actually told us why this
is the case, and it's not at all obvious.

should not encourage (some would say force) people to use such platforms.

In any case it's not a choice for the contributor, internals chooses the
medium and the contributor has to use it. Whether we force them to use a
mailing list from last century or something from this century makes no
difference with regard to choice for the contributor.

Cheers
Joe

Le jeudi 5 septembre 2019, 12:04:55 CEST Brent a écrit :

Huge "no" from me on using github for discussing RFCs.

Care to elaborate why? The majority seems to like it. Though I am also
curious about Nikita's experience with it, as he is the one having to
process the feedback.

Because the PHP project should avoid depending on a privately owned
centralized service for its technical discussions, and should not encourage
(some would say force) people to use such platforms.

PHP is already on github but it’s only a mirror, the main git repository
is at git.php.net .

come@opensides.be Posted 1 year ago by [email protected]view source
unread

Le jeudi 5 septembre 2019, 12:50:48 CEST Joe Watkins a écrit :

Because the PHP project should avoid depending on a privately owned centralized service for its technical discussions

This is obviously your opinion, but you haven't actually told us why this
is the case, and it's not at all obvious.

I thought it was obvious, sorry.
So, the problem is PHP have no control over github, and cannot know how it will evolve.

GAFAM organizations have closed people accounts before, sometimes without giving reasons.
I think PHP project should not let other organisations choose who can or cannot participate in PHP development.

should not encourage (some would say force) people to use such platforms.

In any case it's not a choice for the contributor, internals chooses the
medium and the contributor has to use it. Whether we force them to use a
mailing list from last century or something from this century makes no
difference with regard to choice for the contributor.

With a mailing list the contributor can choose its email server and email client. He does not have to agree to term of service of a third party.
https://tosdr.org/#github
With github, internal chooses to delegate to github, and github (currently microsoft) chooses who can take part in the discussion and how the discussion works. (they can change the platform tomorrow and internal won’t be able to do anything about it).

Dan Ackroyd Posted 1 year ago by Dan Ackroydview source
unread

PHP have no control over github, and cannot know how it will evolve.

(they can change the platform tomorrow and internal won’t be able to do anything about it).

Those are hypothetically problems. But they do not appear to be
currently problems.

I'm pretty sure that if new problems with a medium were encountered,
we could adapt to either work around them or move to a different
system.

And in case anyone says "some people might not be able to comment on
Github" the same is true for our email lists. The signup process was
apparently broken for ages, and I've seen multiple people ask for how
to persuade the system to accept their messages. Which probably means
there are more people who never contributed because they couldn't get
past that first barrier.

Actual problems I can see with having the discussion on github:

i) There is no off-topic space. For example, apparently some people
don't understand the RFC and could do with a brief explainer on type
systems. Doing that inline to the github comments would make the
on-topic discussion harder to read.

ii) It means that the discussion is harder to track. However.....that
is already a problem. When I was putting together the info for
https://github.com/danack/RfcCodex which attempts to document why
certain ideas that keep coming up haven't succeeded yet, it was a
massive pain trying to track email threads to the RFC.

Both of those things are not really technical problems. They are
documentation problems. They would be best solved (imo) by having a
paid member of staff on the PHP project writing lots of words.

cheers
Dan
Ack

George Peter Banyard Posted 1 year ago by George Peter Banyardview source
unread

One idea could be to use a self hosted GitLab instance,

I'm pretty sure there are multiple ways via OAuth to connect to an
independent GitLab instance.

This would allow to have PR like thread on PHP's own infrastructure (even
though it seems the project is pretty bad at keeping it's infrastructure up
to date) while keeping control over it.

Best regards

George Peter Banyard

Brent Posted 1 year ago by Brentview source
unread

Let's name a few examples of large OSS projects managed on GitHub:

 - ECMA (https://github.com/tc39)
 - Rust (https://github.com/rust-lang/rust)
 - React (https://github.com/facebook/react)
 - Node (https://github.com/nodejs/node)

Also, let's not forget the hunderd of thousands of PHP packages hosted on GitHub. While GitHub might in theory one day decide to stop, there is no way it will happen in practice, GitHub has proven itself as a reliable platform over the past ten years.

On the topic of self hosted GitLab: let's not reinvent the wheel. Managing your own platform will take more manpower and resources, which are better invested somewhere else — the development of PHP perhaps?

I believe GitHub is the way to go. Several large communities manage their OSS on it and have proven it works, PHP should simply do the same.

Kind regards
Brent

One idea could be to use a self hosted GitLab instance,

I'm pretty sure there are multiple ways via OAuth to connect to an
independent GitLab instance.

This would allow to have PR like thread on PHP's own infrastructure (even
though it seems the project is pretty bad at keeping it's infrastructure up
to date) while keeping control over it.

Best regards

George Peter Banyard

Rowan Tommins Posted 1 year ago by Rowan Tomminsview source
unread

I believe GitHub is the way to go. Several large communities manage their
OSS on it and have proven it works, PHP should simply do the same.

I think this is just as simplistic as saying "never". What are these
communities using it for, and what would we want to use it for? Are our
requirements the same as theirs, and is GitHub the best solution for those
requirements?

For instance:

  • Rust does not use GitHub as its primary co-ordination mechanism, it has
    an online forum at https://internals.rust-lang.org/
  • The ECMA TC39 committee has a specific membership structure and holds
    regular in-person meetings
  • There are undoubtedly more open-source communities not using GitHub
    than who are using it

To be clear, I'm not saying these are reasons against GitHub in themselves,
but it's a rather huge leap from "here are four repos I found" to "GitHub
is the way to go"; we should be making specific arguments for why it will
meet our needs, and evaluating it among all the alternatives.

Regards,

Rowan Tommins
[IMSoP]

Dan Ackroyd Posted 1 year ago by Dan Ackroydview source

unread

I believe GitHub is the way to go. Several large communities manage their OSS on it and have proven it works, PHP should simply do the same.

At the risk of giving advice, you will find conversations are far more
productive if you ask why something can't be done, rather than just
stating it will be simple.

Not only will that elicit more useful information to you, it avoids
being subtly insulting, as you're implying that something will be easy
and people are being stupid for not doing it*.

In this particular case you could have asked "what would be the
problems with moving the build systems to github?", and the answers
would include:

  • PHP has karma (aka permissions) system which github could not
    support. I don't know how that could be solved/avoided.

  • There is very strong reluctance to be dependent on other people's
    infrastructure for things that could take a long time to migrate. e.g.
    we can move discussions from one medium to another, by just telling
    people to go talk over there. But for actual software CI, it's a big
    deal to move from one system to another.

btw it's not obvious that the projects you linked actually have their
build systems integrated with Github. I'm pretty sure you're making
assumptions about how simple their systems are.

cheers
Dan
Ack

come@opensides.be Posted 1 year ago by [email protected]view source

unread

Le jeudi 5 septembre 2019, 13:07:28 CEST Dan Ackroyd a écrit :

PHP have no control over github, and cannot know how it will evolve.

(they can change the platform tomorrow and internal won’t be able to do anything about it).

Those are hypothetically problems. But they do not appear to be
currently problems.

The fact that PHP has no control over github is current, this is not hypothetical.

And in case anyone says "some people might not be able to comment on
Github" the same is true for our email lists. The signup process was
apparently broken for ages, and I've seen multiple people ask for how
to persuade the system to accept their messages. Which probably means
there are more people who never contributed because they couldn't get
past that first barrier.

It’s not the same when the project can act to fix it and when the project is powerless.
If github blocks someone from commenting we cannot do anything about it.

Rowan Tommins Posted 1 year ago by Rowan Tomminsview source
unread

PHP have no control over github, and cannot know how it will evolve.

(they can change the platform tomorrow and internal won’t be able to
do anything about it).

Those are hypothetically problems. But they do not appear to be
currently problems.

The fact that PHP has no control over github is current, this is not
hypothetical.

The idea that the platform will change overnight in a way that makes it
unusable by the project is hypothetical.

It’s not the same when the project can act to fix it and when the project
is powerless.
If github blocks someone from commenting we cannot do anything about it.

Are you aware of any heavy-handed moderation on github, or is this, again,
a hypothetical problem?

As you will see from my other responses on this thread, I'm not totally
sold on github in particular, but I can see pros and cons more generally:

  • our own systems, fully in our control, but used by nobody else, and
    managed by a handful of volunteers
  • or: a well-established third-party system, which could change in
    unpredictable ways, but is widely used, and supported by hundreds of paid
    staff

Even the mailing list relies on third-party software; I presume it gets
updated regularly, and those updates could include changes in functionality
we disagree with. There is a pragmatic decision to be made between building
absolutely everything from scratch, and trusting some third parties, with
contingency plans if that trust proves ill-founded.

Regards,

Rowan Tommins
[IMSoP]

Lynn Posted 1 year ago by Lynnview source
unread

On Tue, Sep 10, 2019 at 11:02 AM Rowan Tommins [email protected]
wrote:

It’s not the same when the project can act to fix it and when the project
is powerless.
If github blocks someone from commenting we cannot do anything about it.

Are you aware of any heavy-handed moderation on github, or is this, again,
a hypothetical problem?

As much as I like Github for these kind of things, we're forgetting about a
critical part here; The US trade restrictions. Github being a company in
the US, is required to block certain access to users from certain countries.

Regards,
Lynn van der Berg

Rowan Tommins Posted 1 year ago by Rowan Tomminsview source
unread

Are you aware of any heavy-handed moderation on github, or is this, again,

a hypothetical problem?

As much as I like Github for these kind of things, we're forgetting about
a critical part here; The US trade restrictions. Github being a company in
the US, is required to block certain access to users from certain countries.

That's a reasonable point; that (and the inverse: governments blocking
access to github in response to some perceived offence) would be a
potential issue to weigh up against the risks of running our own
infrastructure.

Regards,

Rowan Tommins
[IMSoP]

Kalle Sommer Nielsen Posted 1 year ago by Kalle Sommer Nielsenview source
unread

Den tir. 10. sep. 2019 kl. 13.14 skrev Rowan Tommins [email protected]:

That's a reasonable point; that (and the inverse: governments blocking
access to github in response to some perceived offence) would be a
potential issue to weigh up against the risks of running our own
infrastructure.

We are already under the US law when it comes to distribution of
software as our binaries (like Windows) which contains encryption
software for export since we potentially allow countries which the US
have an embargo with, such as Iran (or more recently Venezuela). If I
remember correctly its partly the reason why PHP is registered as an
entity in the US to comply with EAR. How this is dealt with under the
hood of the project and all of that I have no idea, but even as it
is, we are not currently operating in a noman's land and already live
with restrictions imposed by the governments of the world.

--
regards,

Kalle Sommer Nielsen
[email protected]

Pierre Joye Posted 1 year ago by Pierre Joyeview source

unread

Because the PHP project should avoid depending on a privately owned
centralized service for its technical discussions

This is obviously your opinion, but you haven't actually told us why this
is the case, and it's not at all obvious.

should not encourage (some would say force) people to use such platforms.

In any case it's not a choice for the contributor, internals chooses the
medium and the contributor has to use it. Whether we force them to use a
mailing list from last century or something from this century makes no
difference with regard to choice for the contributor.

I am not worrying when one uses it for draft. However anything after that
should happen in the wiki and on our git as it is the correct process.

I really like github, or gitlab, however int he current context, almost all
contributors may lose access to github (or other US based) companies based
on the US government policies or directives. Without starting a political
discussion whether or not this is valid, it is definitely a big risk. A
risk I am not really willing to take for php itself, if I may say.

best,

Rowan Tommins Posted 1 year ago by Rowan Tomminsview source

unread

Le jeudi 5 septembre 2019, 12:04:55 CEST Brent a écrit :

Huge "no" from me on using github for discussing RFCs.

Care to elaborate why? The majority seems to like it. Though I am also
curious about Nikita's experience with it, as he is the one having to
process the feedback.

Because the PHP project should avoid depending on a privately owned
centralized service for its technical discussions, and should not encourage
(some would say force) people to use such platforms.

PHP is already on github but it’s only a mirror, the main git repository
is at git.php.net .

The "privately owned" and "centralized" parts don't bother me particularly,
but there's potentially an issue in splitting the discussion between
multiple platforms, with different logins required. An example of this is
the discussion on this RFC about type aliases - Nikita requested it to be
split into a separate discussion, but the people involved may not be
subscribed to this list, and if they are, it's hard to maintain context
when jumping between different forums.

That conversation also highlighted a limitation of the particular platform:
inline comments on GitHub PRs show as threads, but comments on the whole PR
don't, so that interleaved discussions are hard to follow. Admittedly,
that's true on a lot of e-mail clients as well (thanks to GMail
popularising "conversations" rather than "threads"), but at least views
like externals.io and news.php.net can let you navigate the tree.

I wonder if a hybrid approach would work better - the RFC is a PR (perhaps
against the language spec repo, as Andrea suggested) but the main
discussion stays on the list. Suggestions to improve the RFC itself could
be made inline on the PR by anyone who wanted to, but non-inline PR
comments would be heavily discouraged so that wider comments on the
proposal would stay here.

Either way, I think it's interesting to experiment with different ways of
working, and maybe there are other platforms we should trial as well.

Regards,

Rowan Tommins
[IMSoP]

Mark Randall Posted 1 year ago by Mark Randallview source
unread

but at least views
like externals.io and news.php.net can let you navigate the tree.

The lack of a full tree-like structure isn't the worst thing in the
world. If only because it discourages certain types of individual from
wanting to reply to every single sub-branch individually to get the
final word.

Something I am finding hard on Github, and maybe it's just because I
haven't found the option yet, is finding new posts.

Mark Randall

Peter Kokot Posted 1 year ago by Peter Kokotview source

unread

Hello,

Le jeudi 5 septembre 2019, 12:04:55 CEST Brent a écrit :

Huge "no" from me on using github for discussing RFCs.

Care to elaborate why? The majority seems to like it. Though I am also curious about Nikita's experience with it, as he is the one having to process the feedback.

Because the PHP project should avoid depending on a privately owned centralized service for its technical discussions, and should not encourage (some would say force) people to use such platforms.

PHP is already on github but it’s only a mirror, the main git repository is at git.php.net .

If I may put few random thoughts here. GitHub usage is inevitable. The
interface is so good with clear discussion and review options that it
would be really worthy to check it out for all PHP RFCS in the future.
The main worry here is basically that one day GitHub will go offline
and that discussion will be lost. Repository however will stay in the
Git repo and will be "timeless". Very rarely one will want to look at
the old (several 10 years) discussion comments. This is not a problem
because even with having an email archive online very rarely someone
will return to such discussion. RFC content is there and will be there
for PHP to move "elsewhere" though if such hypothetical case comes.

Tank you.

--
Peter Kokot

Rowan Tommins Posted 1 year ago by Rowan Tomminsview source
unread

GitHub usage is inevitable.

Did you use the wrong word here, or are you saying that, of all the
hundreds of different platforms we could investigate, there is no chance
that we would end up using something other than github?

The interface is so good with clear discussion and review options

As my previous message, and those of several other people, show, that is
far from an established consensus. The power of an e-mail list is that
different users can use different interfaces - I've yet to see a forum
suggested that I would find easier than Thunderbird's tree view. There are
certainly downsides to e-mail, and upsides to GitHub, but let's stay calm
and evaluate our options rather than jumping at the first thing we see.

Regards,

Rowan Tommins
[IMSoP]

Peter Kokot Posted 1 year ago by Peter Kokotview source
unread

GitHub usage is inevitable.

Did you use the wrong word here, or are you saying that, of all the
hundreds of different platforms we could investigate, there is no chance
that we would end up using something other than github?

Plastic analogy - adding "127.0.0.1 github.com" to your /etc/hosts
file shows that developer cannot bring most of the today's (PHP)
projects to any working state without using it. That's what is meant
by inevitable because everything open source today is either on GitHub
and some minor ones scattered around custom Git repos and other Git
hosting providers. PHP is already using GitHub. Is it moving to
something else? No, so let's not complicate things more with other
hosting providers now.

USA political issues and embargo on some countries are indeed a reason
I'm also willing to accept that PHP won't be using GitHub otherwise.
For other reasons presented here, none is convincing enough to me
honestly.

--
Peter Kokot

Rowan Tommins Posted 1 year ago by Rowan Tomminsview source
unread

Plastic analogy - adding "127.0.0.1 github.com" to your /etc/hosts
file shows that developer cannot bring most of the today's (PHP)
projects to any working state without using it. That's what is meant
by inevitable because everything open source today is either on GitHub
and some minor ones scattered around custom Git repos and other Git
hosting providers.

Ah, I see. Yes, having some usage of GitHub is currently pretty much
inevitable in that sense. Of course, that may change eventually, just as
SourceForge fell out of favour, but that's not something we need to worry
about.

However, projects over a certain size generally don't use it as their
main or only discussion platform, which is what we're talking about here.

PHP is already using GitHub. Is it moving to
something else? No, so let's not complicate things more with other
hosting providers now.

The question is not "should PHP ban the use of GitHub for any kind of
activity?" it's "should PHP abandon the discussion processes it's been
using for most of its history and use GitHub as a discussion forum?".

As a code collaboration platform, GitHub is pretty good, but it's not built
as a discussion forum, and there are plenty of limitations to using it as
one.

Regards,

Rowan Tommins
[IMSoP]

Benjamin Morel Posted 1 year ago by Benjamin Morelview source
unread

As a code collaboration platform, GitHub is pretty good, but it's not built
as a discussion forum, and there are plenty of limitations to using it as
one.

Could we work on agreeing on a set of requirements for such a discussion
"forum" to replace mailing lists? That would make it easier for anyone
wanting to give it a shot, to come up with a first version that has a
chance to convince everyone that this is the direction we want to follow.

Using GitHub Issues as a starting point, what would you change?

— Benjamin

Rowan Tommins Posted 1 year ago by Rowan Tomminsview source
unread

On Fri, 6 Sep 2019 at 14:14, Benjamin Morel [email protected]
wrote:

As a code collaboration platform, GitHub is pretty good, but it's not built

as a discussion forum, and there are plenty of limitations to using it as
one.

Could we work on agreeing on a set of requirements for such a discussion
"forum" to replace mailing lists?

That could be an interesting exercise, yes. Ideally, we should consider RFC
drafting, voting, and bug tracking as well - not because we have to replace
all of them with one platform, but because we might want to divide things
up differently from how we do at the moment.

Using GitHub Issues as a starting point, what would you change?

That's pretty much the opposite of your previous question. For one thing,
it's unanswerable without knowing the scope - e.g. would it just be for
RFCs, or all discussions?

Besides that, if we're going to introduce an anchor that we compare
everything to, surely we should say "using the setup we have as a starting
point, what would you change?"

Until we know what we're looking for, I'm really not clear why GitHub
issues should have any starting advantage over Discourse, or PHPBB, or
Trac, or Phabricator, or Bugzilla, or probably hundreds of suggestions we
could evaluate.

Regards,

Rowan Tommins
[IMSoP]

Benjamin Morel Posted 1 year ago by Benjamin Morelview source
unread

That's pretty much the opposite of your previous question. For one thing,
it's unanswerable without knowing the scope - e.g. would it just be for
RFCs, or all discussions?

I'm thinking about a generic "forum" for all discussions that happen on the
mailing lists right now, something that could be used for internals but
also for other PHP mailing lists.

Then, its scope can be expanded specifically for internals, to better
discuss RFCs, etc., but that's not what I had in mind right now.

Until we know what we're looking for, I'm really not clear why GitHub

issues should have any starting advantage over Discourse, or PHPBB, or
Trac, or Phabricator, or Bugzilla, or probably hundreds of suggestions we
could evaluate.

I chose GitHub because it was mentioned several times in this thread,
because it's already used to discuss PRs, and because I suspect pretty much
everyone on this list either uses GitHub on a daily basis, or has at
least some
experience with GitHub issues (let's face it, I google stuff every day for
many open-source projects, and most of the discussions I stumble upon are
on GitHub issues/pulls), so at least we have a
starting point
that
everyone knows and has learned to love or hate. Now the whole point is, if
you think another software does things better, please share!

Now obviously, should you hate GitHub issues from start to finish, then
indeed I can understand you consider this starting point a poor choice, in
this case I'd be interested to know what you dislike so much!

— Benjamin

Kalle Sommer Nielsen Posted 1 year ago by Kalle Sommer Nielsenview source

unread

Den tor. 5. sep. 2019 kl. 13.22 skrev Côme Chilliet [email protected]:

Because the PHP project should avoid depending on a privately owned centralized service for its technical discussions, and should not encourage (some would say force) people to use such platforms.

PHP is already on github but it’s only a mirror, the main git repository is at git.php.net .

As an old timer around here, I feel very strongly about moving the
medium and I prefer to be on the PHP.net infrastructure. Clearly one
of our biggest issues with that as the PHP organization is that we
poorly maintain it, and I think it could be time to rather invest into
renewing that effort instead. It seems like many have an issue with
subscribing to internals (I know it was broken for the longest time by
using the webform), but that is something we can telegraph better on
the php.net website for one thing and try to put resources into
figuring this problem out to gain momentum for more developers to join
the effort of internals development.

Using Github for PRs and relevant discussions for that is perfectly
fine with me, but switching to Github for RFCs is a big -1 from me, it
is really difficult to read new comments if you are not email
subscribed and even then it still remains hard to follow. The
individual moderation required to also sort out irrelevant comments is
also one thing I personally would not want to deal with either.

--
regards,

Kalle Sommer Nielsen
[email protected]

Nikita Popov Posted 1 year ago by Nikita Popovview source

unread

Here are my own thoughts on how the pull request discussion for union types
went...

I think the main takeaway for me is that inline comments (on specific lines
in the RFC) were really invaluable. Each comment thread discussed a
specific issue and most of them have resulted in a direct improvement to
the RFC.

Generally there was a lot of discussion of specific technical details that
we very rarely see in RFC discussions. Current RFC discussions on the
mailing list tend to be rather high level (which is fine in itself), with
nobody ever discussing the details (which is very bad).

Thinking back to https://wiki.php.net/rfc/engine_warnings, I think that RFC
could have really benefited from this discussion medium. While the mailing
list discussion ended up talking circles around more or less one single
question (undefined variables), pretty much none of the other parts of the
RFC have seen so much as a comment. I'm sure that there would be a lot more
discussion regarding specific classifications if this went up as a pull
request.

Another nice thing is that it's possible to mark a comment thread as
resolved, once the RFC has been adjusted to address the comments. That way
you don't have to see issues that were already addressed (though you can if
you like).

Having thumbs-up and thumbs-down reactions to comments was also helpful to
judge whether some comment represents a minority opinion or not, something
that is notoriously hard with current mailing list discussions (which are
almost dominated by "negative" opinions which mysteriously don't show up in
voting results).

However, while the inline comments were pleasantly insightful, the same
cannot be said for the top-level comments on the pull request. The majority
of them was borderline off-topic. While some in principle interesting
discussion happened there, it simply didn't belong in the RFC thread for
union types. The top-level comments also suffered from a lack of threading
-- I would have been less bothered about tangential discussions if they
were threaded. (To be fair: I use gmail, so I don't get threading on the
mailing list either.)

If this kind of discussion behavior is representative, then I would suggest
a workflow alone the following lines...

  • RFCs are submitted as PRs on GitHub, but must be announced on the mailing
    list.
  • The PR description should have a fat warning that top-level comments
    belong on the mailing list. We can mark all top-level comments on PRs as
    "off-topic" as a matter of general policy.
  • Top-level commentary stays on the mailing list.

This is a shift from what I originally had in mind (completely moving the
RFC process to GitHub), towards providing a way for more detailed and
specific feedback on the RFC text.

Regarding GitHub as a 3rd party. I think there are a few things to
considered:

  • We're already very heavily reliant on GitHub. Most of my day-to-day
    interaction with PHP core development is via GitHub and most of the
    day-to-day decisions also happen there. Only the major stuff everhits this
    mailing list.
  • The RFC repo would of course be hosted on git.php.net as usual and only
    be mirrored to GitHub.
  • GitHub would not be the exclusive venue for RFC discussion. All RFCs are
    still announced on internals and the top-level discussion can and should
    still happen here.

Disclaimer: I'm trying to draw conclusions here from an experiment with a
sample size of 1, which may not be representative. Union types are a pretty
significant proposal (and also the first one to be on GH), and other,
smaller proposals might well have different discussion dynamics.

Regards,
Nikita

Le jeudi 5 septembre 2019, 12:04:55 CEST Brent a écrit :

Huge "no" from me on using github for discussing RFCs.

Care to elaborate why? The majority seems to like it. Though I am also
curious about Nikita's experience with it, as he is the one having to
process the feedback.

Because the PHP project should avoid depending on a privately owned
centralized service for its technical discussions, and should not encourage
(some would say force) people to use such platforms.

PHP is already on github but it’s only a mirror, the main git repository
is at git.php.net .

Brent Posted 1 year ago by Brentview source
unread

Happy to read your thoughts on this Nikita, I think you've drawn some good conclusions.

If I may add a thought or two:

I wouldn't make any final decisions based on one experiment, especially a big RFC as this one. I think the GitHub discussion got extra attention because it was the first one, and because of the scope of the RFC. I would try to have two or three more RFCs discussed on GitHub, maybe smaller ones?

Second, there are more things we can do in order to keep the main thread on topic. Three things come to mind:

 - We could add community guidelines, clearly stating that RFC comments should stay on topic
 - People could be appointed to moderate the comments, allowing contributors to focus on the code instead of community management
 - Conversations on GitHub can be locked as a last measurement. Repository members can still comment.

I fear that separating the main discussion from the PR will cause unnecessary confusion: important, generals remarks could be made on the "main thread", and I think there's value in keeping these remarks together with everything else.

Kind regards
Brent

Here are my own thoughts on how the pull request discussion for union types
went...

I think the main takeaway for me is that inline comments (on specific lines
in the RFC) were really invaluable. Each comment thread discussed a
specific issue and most of them have resulted in a direct improvement to
the RFC.

Generally there was a lot of discussion of specific technical details that
we very rarely see in RFC discussions. Current RFC discussions on the
mailing list tend to be rather high level (which is fine in itself), with
nobody ever discussing the details (which is very bad).

Thinking back to https://wiki.php.net/rfc/engine_warnings, I think that RFC
could have really benefited from this discussion medium. While the mailing
list discussion ended up talking circles around more or less one single
question (undefined variables), pretty much none of the other parts of the
RFC have seen so much as a comment. I'm sure that there would be a lot more
discussion regarding specific classifications if this went up as a pull
request.

Another nice thing is that it's possible to mark a comment thread as
resolved, once the RFC has been adjusted to address the comments. That way
you don't have to see issues that were already addressed (though you can if
you like).

Having thumbs-up and thumbs-down reactions to comments was also helpful to
judge whether some comment represents a minority opinion or not, something
that is notoriously hard with current mailing list discussions (which are
almost dominated by "negative" opinions which mysteriously don't show up in
voting results).

However, while the inline comments were pleasantly insightful, the same
cannot be said for the top-level comments on the pull request. The majority
of them was borderline off-topic. While some in principle interesting
discussion happened there, it simply didn't belong in the RFC thread for
union types. The top-level comments also suffered from a lack of threading
-- I would have been less bothered about tangential discussions if they
were threaded. (To be fair: I use gmail, so I don't get threading on the
mailing list either.)

If this kind of discussion behavior is representative, then I would suggest
a workflow alone the following lines...

  • RFCs are submitted as PRs on GitHub, but must be announced on the mailing
    list.
  • The PR description should have a fat warning that top-level comments
    belong on the mailing list. We can mark all top-level comments on PRs as
    "off-topic" as a matter of general policy.
  • Top-level commentary stays on the mailing list.

This is a shift from what I originally had in mind (completely moving the
RFC process to GitHub), towards providing a way for more detailed and
specific feedback on the RFC text.

Regarding GitHub as a 3rd party. I think there are a few things to
considered:

  • We're already very heavily reliant on GitHub. Most of my day-to-day
    interaction with PHP core development is via GitHub and most of the
    day-to-day decisions also happen there. Only the major stuff everhits this
    mailing list.
  • The RFC repo would of course be hosted on git.php.net as usual and only
    be mirrored to GitHub.
  • GitHub would not be the exclusive venue for RFC discussion. All RFCs are
    still announced on internals and the top-level discussion can and should
    still happen here.

Disclaimer: I'm trying to draw conclusions here from an experiment with a
sample size of 1, which may not be representative. Union types are a pretty
significant proposal (and also the first one to be on GH), and other,
smaller proposals might well have different discussion dynamics.

Regards,
Nikita

Le jeudi 5 septembre 2019, 12:04:55 CEST Brent a écrit :

Huge "no" from me on using github for discussing RFCs.

Care to elaborate why? The majority seems to like it. Though I am also
curious about Nikita's experience with it, as he is the one having to
process the feedback.

Because the PHP project should avoid depending on a privately owned
centralized service for its technical discussions, and should not encourage
(some would say force) people to use such platforms.

PHP is already on github but it’s only a mirror, the main git repository
is at git.php.net .

Rowan Tommins Posted 1 year ago by Rowan Tomminsview source
unread

 - We could add community guidelines, clearly stating that RFC comments
should stay on topic
 - People could be appointed to moderate the comments, allowing
contributors to focus on the code instead of community management
 - Conversations on GitHub can be locked as a last measurement.
Repository members can still comment.

I fear that separating the main discussion from the PR will cause
unnecessary confusion: important, generals remarks could be made on the
"main thread", and I think there's value in keeping these remarks
together with everything else.

I'm sceptical of that as a solution for two reasons:

Firstly, the conversations weren't necessarily wrong, they were just a slight drift of topic. The problem is not removing them from the PR, it's encouraging them to move somewhere else. I fear that saying "sign up to the mailing list and repeat that point in a completely different format" will be taken up less than "make a new thread on this same list/forum".

Secondly, the problem is partly a technical one: GitHub PRs have very poor support for replies and sub-threads, so even on-topic discussions that don't relate to a specific part of the text are hard to follow.

I think Nikita's suggestion is a good one: use a PR for making targeted suggestions to the RFC text itself, but raise the general points on the main list. That might even include saying "I've added a handful of suggestions relating to X" and discussing the wider issue that links them.

I agree it would be interesting to experiment further, and I think this hybrid approach would be a good one to try next.

Regards,

--
Rowan Tommins
[IMSoP]

come@opensides.be Posted 1 year ago by [email protected]view source

unread

Le vendredi 6 septembre 2019, 16:47:52 CEST Nikita Popov a écrit :

  • GitHub would not be the exclusive venue for RFC discussion. All RFCs are
    still announced on internals and the top-level discussion can and should
    still happen here.

My remark on the mailing list regarding string|true was unanswered and I had to go over to github to see that the concern was discussed there.
This is the kind of problems splitting the discussion will cause, people will have to check both places or miss things.

Regarding the github PR as a practical point of view, I find it hard to check if there are new messages since last time I visited the page. Is there any way to browse messages by time? (backwards ideally).


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK