May 11, 2004 Re: Just a thought with slices. | ||||
---|---|---|---|---|
| ||||
Posted in reply to A. Stevenson | A. Stevenson <alexstev AT uk.ibm.com> wrote: >In article <c7qbon$4ba$1@digitaldaemon.com>, Phill says... > > >>"A. Stevenson" <A._member@pathlink.com> wrote in message >>news:c7q6nh$2ufr$1@digitaldaemon.com... >> >> >>>In article <c7p18a$17t5$1@digitaldaemon.com>, J C Calvarese says... >>> >>> >> >>Well according to JA's suggestion, the length being >>referred to would be the length of the spam[]. >>I dont know about anyone else, but I know that >>I would have changed the name of the int to save >>future confusion. >> >>With JA's suggestion there would be no need for >>using a with block, because the [] would automatically >>act like a with block for anything that is inside the >>[]. >> >>Phill. >> >> >> >> >> > >But suppose that the array is a class that overloads opSlice - you get problems >if your local variables have the name of any of the public class methods/member >vars/attributes > > I've already explained that this would cause a compile error which would be solved by giving the full namespace. -- -Anderson: http://badmama.com.au/~anderson/ |
May 11, 2004 Re: Just a thought with slices. | ||||
---|---|---|---|---|
| ||||
Posted in reply to J Anderson | In article <c7qcpp$5ge$1@digitaldaemon.com>, J Anderson says... > >A. Stevenson <alexstev AT uk.ibm.com> wrote: > >>In article <c7qbon$4ba$1@digitaldaemon.com>, Phill says... >> >> >>>"A. Stevenson" <A._member@pathlink.com> wrote in message news:c7q6nh$2ufr$1@digitaldaemon.com... >>> >>> >>>>In article <c7p18a$17t5$1@digitaldaemon.com>, J C Calvarese says... >>>> >>>> >>> >>>Well according to JA's suggestion, the length being >>>referred to would be the length of the spam[]. >>>I dont know about anyone else, but I know that >>>I would have changed the name of the int to save >>>future confusion. >>> >>>With JA's suggestion there would be no need for >>>using a with block, because the [] would automatically >>>act like a with block for anything that is inside the >>>[]. >>> >>>Phill. >>> >>> >>> >>> >>> >> >>But suppose that the array is a class that overloads opSlice - you get problems if your local variables have the name of any of the public class methods/member vars/attributes >> >> >I've already explained that this would cause a compile error which would be solved by giving the full namespace. > >-- >-Anderson: http://badmama.com.au/~anderson/ My apologies - that's what I get for trying to work and read newsgroups at the same time :) |
Copyright © 1999-2021 by the D Language Foundation