New topic: Xojo's 0-based index scheme
<http://forums.realsoftware.com/viewtopic.php?t=47842> Page 1 of 1 [ 8 posts ] Previous topic | Next topic Author Message me.self Post subject: Xojo's 0-based index schemePosted: Fri May 10, 2013 1:01 pm Joined: Wed May 25, 2011 10:18 am Posts: 29 I read somewhere that the new Xojo framework will have everything index-0-based, instead of the current mix of 0/1-based things. While I would prefer 1-based for it's clearness, I'm ok with 0-based, if it unifies the language. My concern is, is this really consequently implemented this time, so we can stop searching the language reference for every thing's index scheme? That'd mean really everything, i.e. elements of RectControls, string operations, actually all build-in classes...? Kind regards Christian _________________ me.self works with: Real Studio Pro (always the latest), 10.7.x, Mac mini i5, Love Top ktekinay Post subject: Re: Xojo's 0-based index schemePosted: Fri May 10, 2013 1:14 pm Joined: Mon Feb 05, 2007 5:21 pm Posts: 587 Location: New York, NY This is in the new framework that nobody outside of Xojo has seen, so I can only report what they said at the conference: Every call within the new framework that requires an index will be 0-based, including strings. _________________ Kem Tekinay MacTechnologies Consulting http://www.mactechnologies.com/ Need to develop, test, and refine regular expressions? Try RegExRX. Top charonn0 Post subject: Re: Xojo's 0-based index schemePosted: Fri May 10, 2013 1:54 pm Joined: Mon Apr 02, 2007 2:08 am Posts: 1204 Location: San Francisco, CA, USA While I like the idea of a unified scheme, won't any such change introduce bugs into enormous amounts of existing code? _________________ Boredom Software Top ktekinay Post subject: Re: Xojo's 0-based index schemePosted: Fri May 10, 2013 1:56 pm Joined: Mon Feb 05, 2007 5:21 pm Posts: 587 Location: New York, NY No, because this is in the new framework. The existing framework remains untouched so your existing code remains unchanged until you change it yourself. _________________ Kem Tekinay MacTechnologies Consulting http://www.mactechnologies.com/ Need to develop, test, and refine regular expressions? Try RegExRX. Top Bob Keeney Post subject: Re: Xojo's 0-based index schemePosted: Fri May 10, 2013 1:58 pm Joined: Fri Sep 30, 2005 11:48 am Posts: 3535 Location: Lenexa, KS charonn0 wrote:While I like the idea of a unified scheme, won't any such change introduce bugs into enormous amounts of existing code? No, because the global namespace framework (what you're using now) will be available for a long time. When the new Xojo namespace framework is introduced you won't have to change ANYTHING in your code. _________________ Bob K. A blog about being a Real Studio/Xojo developer at http://www.bkeeneybriefs.com Top DaveS Post subject: Re: Xojo's 0-based index schemePosted: Fri May 10, 2013 6:17 pm Joined: Sun Aug 05, 2007 10:46 am Posts: 4863 Location: San Diego, CA How about adding an "OPTION BASE" like feature, then it will never matter _________________ Dave Sisemore iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1 Note : I am not interested in any solutions that involve custom Plug-ins of any kind Top capaho Post subject: Re: Xojo's 0-based index schemePosted: Sat May 11, 2013 9:47 am Joined: Fri Jul 21, 2006 12:28 am Posts: 506 Counting in the computer world has always started at 0, so I don't see a problem with this. 1-based counting is actually the anomaly as far as coding goes, so I say good riddance to i = 0 to blah - 1. _________________ Regards, Carl Capaho Web http://www.capaho.com Top npalardy Post subject: Re: Xojo's 0-based index schemePosted: Sat May 11, 2013 10:30 am Real Software Engineer Joined: Sat Dec 24, 2005 8:18 pm Posts: 7833 Location: Canada, Alberta, Near Red Deer DaveS wrote:How about adding an "OPTION BASE" like feature, then it will never matter I doubt we'll do this ever - its been asked before. OPTION BASE is one of the biggest causes of issues in VB code. Why ? You write code with option base 1 - so you depend on things being 1 based. I write code with option base 0 - so my code depends on it being 0 based. Now you give me your code & I give you mine & it both sets of code very quietly break and you have NO clue it's done so until you get bug reports _________________ Norman Palardy (Real Software) Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 8 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
