# C++-like function-try-block proposal

- Thread: https://externals.io/message/101218
- Original archive: https://news-web.php.net/php.internals/101218
- Started by Alexei Gerasimov on 2017-12-02T13:27:53+00:00
- Messages: 6
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #101218 — Alexei Gerasimov — 2017-12-02T13:27:53+00:00

URL: https://externals.io/message/101218#101218

> > […]
>
> Sorry for the trouble, seems like nobody tested the sign up process after the server migration yet. It seems like the e-mail sender configuration is missing.
> 
> 
> Unfortunately, I don't know the right config, so I can't simply fix it, but I've sent a message to Hannes, he probably knows.

Any update? The reset password feature of wiki.php.net doesn't work either, I receive no e-mail.

---

## #101219 — Andreas Hennings — 2017-12-02T18:13:09+00:00

URL: https://externals.io/message/101218#101219 · In reply to: #101218

So to summarize, this feature would save us brackets and one indentation
level.
Saving an indentation level can be quite useful to reduce a git commit
footprint.

On the other hand, it might confuse some people. It would blur the concept
of a function body scope, and thus the mental model of how the language
works.
E.g. are local variables and parameters shared between the try {} and the
catch {} block?

It would also mean that userland PHP parsers and IDEs need to support the
syntax.

So personally I am undecided or skeptical. It does feel alien to me.
Usually if I want to avoid the extra indentation, I will put the try {}
part into a separate function.
But this is just me.


On 2 December 2017 at 14:27, Alexei Gerasimov <enclaved@safe-mail.net>
wrote:

> > […]
> been created and the password was sent by email." However, I did not
> receive any e-mail with the password.
> > […]
> after the server migration yet. It seems like the e-mail sender
> configuration is missing.
> > […]
> but I've sent a message to Hannes, he probably knows.
>
> Any update? The reset password feature of wiki.php.net doesn't work
> either, I receive no e-mail.

---

## #101220 — Sherif Ramadan — 2017-12-02T20:02:32+00:00

URL: https://externals.io/message/101218#101220 · In reply to: #101219

I think we get this "I want to make PHP more like <language X>" thing more
often than any other language change proposals. I'm not strictly opposed to
the idea of borrowing from other languages. Though when the thesis
statement is almost exclusively about making PHP feel more like <language
X> than anything else I'd rather not entertain the idea further.

I agree with Nikita that this feature in C++ adds no intrinsic value to
PHP. I'm never overly excited about purely syntactic sugar changes in PHP.
We've already changed so much of the language in PHP 7 that I'm finding
some people struggling with keeping up with PHP 5 - 7 migration paths (and
I'm speaking from first hand experience having to deal with one myself at
work).

I'd like to see an RFC that demonstrates a stronger use case than "avoiding
one level of indentation and <just cause we can>", however. Kind of erring
on the side of +0 with Sara here.

On Sat, Dec 2, 2017 at 1:13 PM, Andreas Hennings <andreas@dqxtech.net>
wrote:

> So to summarize, this feature would save us brackets and one indentation
> level.
> Saving an indentation level can be quite useful to reduce a git commit
> footprint.
>
> On the other hand, it might confuse some people. It would blur the concept
> of a function body scope, and thus the mental model of how the language
> works.
> E.g. are local variables and parameters shared between the try {} and the
> catch {} block?
>
> It would also mean that userland PHP parsers and IDEs need to support the
> syntax.
>
> So personally I am undecided or skeptical. It does feel alien to me.
> Usually if I want to avoid the extra indentation, I will put the try {}
> part into a separate function.
> But this is just me.
>
>
> On 2 December 2017 at 14:27, Alexei Gerasimov <enclaved@safe-mail.net>
> wrote:
>
> > […]

---

## #101225 — Niklas Keller — 2017-12-03T11:14:10+00:00

URL: https://externals.io/message/101218#101225 · In reply to: #101218

>
> > […]
> been created and the password was sent by email." However, I did not
> receive any e-mail with the password.
> > […]
> after the server migration yet. It seems like the e-mail sender
> configuration is missing.
> > […]
> but I've sent a message to Hannes, he probably knows.
>
> Any update? The reset password feature of wiki.php.net doesn't work
> either, I receive no e-mail.
>

No, sorry. Neither Hannes nor anybody from systems@ has responded yet.

Regards, Niklas

---

## #101226 — Christoph M. Becker — 2017-12-03T12:32:56+00:00

URL: https://externals.io/message/101218#101226 · In reply to: #101225

> No, sorry. Neither Hannes nor anybody from systems@ has responded yet.
As a workaround it should be sufficient to request a php.net account via
<http://php.net/git-php.php> (use the same username and email address);
after somebody has approved the account, access to the Wiki should be
granted.

-- 
Christoph M. Becker

---

## #101248 — Niklas Keller — 2017-12-05T15:03:02+00:00

URL: https://externals.io/message/101218#101248 · In reply to: #101226

>
> > […]
> As a workaround it should be sufficient to request a php.net account via
> <http://php.net/git-php.php> (use the same username and email address);
> after somebody has approved the account, access to the Wiki should be
> granted.
>

Sorry for the delay, a working configuration is now in place.

I hope you're able to login now after using the password reset feature.

Regards, Niklas
