develooper Front page | perl.perl5.porters | Postings from July 2016

Re: Indented here docs?

Thread Previous | Thread Next
Sawyer X
July 16, 2016 16:49
Re: Indented here docs?
Message ID:

I am replying to this because I want to make my position clear, but I
wish to note that I agree with Zefram's response and find it apt.

Bare << was deprecated for 20 years now. It has now been a principal
part of a discussion on a new feature and stood in the way. The fact
that we ended up picking different syntax which does not mix with bare
<< does not mean it was not in the way. As such, and in any such
situation[1], it is subject for removal.

I believe that we *should* remove bare << now, even though we picked <<~
instead of <<-.

I wish to add that despite the desire of some people to keep Perl 5
standing in place, it is a language, and it evolves. That means new
features will be introduced and old syntax might be removed, when deemed
necessary. The value of having a reasonable feature (in this case,
indented heredocs) versus keeping a deprecated feature (bare <<), which
was decided in '96 by Larry to deprecate, is greater. If one wishes to
remain with the syntax of Perl pre-1996 with no alterations, one may
revert to Perl 5.002.

[1] Any feature that has been deprecated for 20 years and has been
raised as a problem in introducing new syntax.

On 07/11/2016 02:46 AM, Aristotle Pagaltzis wrote:
> * Zefram <> [2016-07-11 00:36]:
>> Matthew Horsfall (alh) wrote:
>>>        and even if we want to get rid of bare <<.
>> Yes, we are. The issue we've had finding a syntax for indented
>> heredocs mean that the bare << is now an actual impediment to
>> desirable development. We did actually find a non-clashing syntax this
>> time, but there aren't many non-clashing characters left if we want to
>> do something similar again.
> *If* we want to do something similar again. But we have no such plans at
> this time. Under these circumstances this argument amounts to “we should
> remove it just in case”.
> That is the exact opposite of the current dictum to not break backcompat
> until and unless it impedes actual changes.
> I would say that this incident instead argues that bare << should be
> scaled back from deprecated to discouraged. That was arguably the intent
> of its deprecation, which antedates that particular distinction and has
> yet to require cashing in. Since long-standing deprecations are bad for
> the language, it should be done away with.
> This is all argued under the premise that we go with <<~. If instead we
> go for <<- then the conclusions differ since we have a situation that
> merits considering removal of bare <<.
> But either we pick the option that requires cashing in the deprecation
> and we do cash it in – or we pick the option that doesn’t and we don’t.
> Regards,

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About