Re: Re: Adding new closing tag =?> for keeping trailing newline

From: Date: Tue, 07 Jun 2022 15:27:16 +0000
Subject: Re: Re: Adding new closing tag =?> for keeping trailing newline
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-117866@lists.php.net to get a copy of this message
On Mon, Jun 6, 2022 at 6:47 PM shinji igarashi <shinji.igarashi@gmail.com> wrote: > > Hello! > > I asked for opinions on reddit also. > > https://www.reddit.com/r/PHP/comments/v5le6h/adding_new_closing_tag_for_keeping_trailing/ > > Popularity on reddit and acceptance by people with voting rights on > internals can be different, but it seems that, at least in its current > form, this proposal would have a hard time winning the vote. > > Until I can come up with a stronger persuasion or a nicer way of > doing this, I don't feel it has a chance to win, so I'm withdrawing > from this proposal for now and going to work on something else. > > Thanks for taking a look! > > -- > Shinji Igarashi > > 2022年6月5日(日) 17:23 shinji igarashi <sji@sj-i.dev>: > > > > Hello everyone, > > > > I'd like to propose adding a new closing tag =?> > > to the language. > > > > PHP currently removes the newline character immediately following > > the closing tag ?>. > > > > With the new closing tag =?>, the code should look > > like this: > > > > ``` > > - <?= 1 =?> > > - <?= 2 =?> > > - <?= 3 =?> > > ``` > > > > and the results it produces would be: > > > > ``` > > - 1 > > - 2 > > - 3 > > ``` > > > > instead of the following: > > > > ``` > > - 1- 2- 3 > > ``` > > > > This addition requires only a one-line modification to the lexer and > > doesn't break BC. The proposed patch is here. > > https://github.com/php/php-src/pull/8708 > > > > Before writing an RFC, I would like to hear your input on whether > > it's worth tackling. > > > > Thanks! > > > > -- > > Shinji Igarashi > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > FWIW, I think it makes a lot of sense, having used golang's template language (not everyone is generating HTML with PHP). I think you may just be dealing with a vocal minority and it would be worth putting to an actual vote. Even if it fails, we'll learn something the next time someone wants to change something like this.

« previous php.internals (#117866) next »