On Wed, Mar 16, 2016 at 10:47 PM, Fleshgrinder <p...@fleshgrinder.com> wrote:
> On 3/16/2016 10:12 PM, Björn Larsson wrote: > > Like the RFC :) > > > > Could this be an opportunity to have default visibility for property's > when > > they are typed in a similar fashion like for functions? Meaning no > > visibility > > implies public and code below would work. > > class A { > > int $i=7; > > function f() { > > echo $this->i; > > } > > } > > $a = new A(); > > $a->f(); > > echo $a->i; > > > > Was inspired by discussion in "var" Deprecation thread. > > > > Regards //Björn > > > > I'd rather like to see this being package visible rather than public. Of > course, that would be yet another Java thingy and I am not trying to > jump on the bandwagon here. > Sorry to dampen your enthusiasm, but you are going slightly off topic here. Package visibility was tried by Guilherme Blanco before, the way namespaces are implemented this is not possible in PHP in an easy way. As far as i understood him, its way too much work for the little benefit. Typed properties is a huge concept on its own, one small step at a time :-) > >