Tom Christiansen wrote: > > > print "Today's weather will be $weather->temp degrees and sunny."; > > So, the -> operator is supposed to get expanded in dq strings, eh? It already does, or at least appears to to users: print "Today's weather will be $weather->{temp} degrees and sunny."; print "Today's weather will be $weather->[0] degrees and sunny."; > Isn't it inconsistent to do this? I think it's far more inconsistent to have the above work but not have methods interpolate. And yes, I realize they're different thingies but they're very close syntactically and cognitively, especially for data access (which is really what we're talking about here). I've always found it quite surprising and cumbersome to have to do this: print "Today's weather will be ", $weather->temp, " degrees and sunny."; When the above two work fine. -Nate
- RFC - Interpolation of method calls Michael G Schwern
- Re: RFC - Interpolation of method calls Michael Fowler
- Re: RFC - Interpolation of method calls Nathan Wiger
- Re: RFC - Interpolation of method calls Michael Fowler
- Re: RFC - Interpolation of method calls David L. Nicol
- Re: RFC - Interpolation of method calls Michael Fowler
- Re: RFC - Interpolation of method calls Tom Christiansen
- Re: RFC - Interpolation of method calls Nick Ing-Simmons
- Re: RFC - Interpolation of method calls Tom Christiansen
- Re: RFC - Interpolation of method calls Michael G Schwern
- Re: RFC - Interpolation of method calls Nathan Wiger
- Re: RFC - Interpolation of method calls Tom Christiansen
- Re: RFC - Interpolation of method calls Nathan Wiger
- Re: RFC - Interpolation of method ... Tom Christiansen
- Re: RFC - Interpolation of met... Michael G Schwern
- Re: RFC - Interpolation of... Tom Christiansen
- Re: RFC - Interpolation of... Michael G Schwern
- Re: RFC - Interpolation of... Tom Christiansen
- Re: RFC - Interpolation of met... Nathan Wiger
- Re: RFC - Interpolation of... Tom Christiansen
- Re: RFC - Interpolation of... Tom Christiansen