Re: Proposal for deprecate alternate syntax(curly braces) for array and string access

From: Date: Fri, 15 Mar 2019 18:23:32 +0000
Subject: Re: Proposal for deprecate alternate syntax(curly braces) for array and string access
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-104760@lists.php.net to get a copy of this message
Den fre. 15. mar. 2019 kl. 19.53 skrev Levi Morrison <levim@php.net>: > Four thoughts: > > 1. I cannot think of *any* reason to separate them. If you want to > make sure you are indexing a string, *do a type check*, not bake ›0¤cä­w"�d1ÃM > {} > into only working on strings. > 2. While Kalle says pretty much every codebase they've seen lately > has used {} for indexing, I have *never* seen a codebase that > used > it. Well maybe that happens to be just me, not a huge amount of usages but there is usually some. > 3. In any case, usage of {} can be migrated to > [] by a style > fixer, right? > 4. Even if we deprecate {}, I don't think we'd be > in any hurry to > remove it, though with an automatic fixer this seems doable, if we > care to do it at all. The thing is, I just don't understand the rationale to remove this feature, what the full gain from doing so is? -- regards, Kalle Sommer Nielsen kalle@php.net

« previous php.internals (#104760) next »