2012/8/1 Christoph Hochstrasser <[email protected]>:
> I'm lately using @$var["key"] a lot (despite it's slowness) and I like it a
> lot. It makes
> most code a lot more readable. I would be +1 for it, if we can make it fast.
>
> I think most people (me included) want only to avoid the notice for accessing undefined array
> offsets. What if we just remove the notice for accessing undefined array offsets, because it's
> the most common use case?
Getting philosophical. It's the same as if you want to read a page in
a book, but that page doesn't exist. For example a book with 40 pages,
but you want to read page 42. :) Is it an error to try it? Yes,
because if possible without error, you could do the same with the
universe and look at a part of it that doesn't exist. Someone has to
create it first. :)
More serious: For me it's the other way arround, it's one of the best
things, that have been introduced, because before it, a very small
write error had big impacts.
I see - as you - the need to make simple things more short, but
removing warnings from existing code constructs is definitly the wrong
way.
--
Alex Aulbach