[AccessD] VBA Field Names - Curiosity Question

Stuart McLachlan stuart at lexacorp.com.pg
Thu Jul 4 05:43:10 CDT 2013


Bad news on modern dev tools as VS 15+ sub-routines would still exevcute slower than 185 
code lines long "clean code sequence".

There will ALWAYS be overhead in calling sub routines because of the requirement to  
write/read stack pointers.   Even more so in a framework  such as VB compared to native 
code.

-- 
Stuart

On 4 Jul 2013 at 13:22, Salakhetdinov Shamil wrote:

> >>> Followed by 185 lines of code. >>> Good news on modern dev tools as
> VS is that they optimize subroutines calls and so having 185 code
> lines long "clean code sequence" would execute as fast as 15+
> subroutines representing the same logic. Hope VBA will get such
> compilation and execution features in the future versions. I have
> quoted "clean code sequence" just to note that "code clearness" is
> dependent IMO on many factors. 
> 
> -- Shamil
> Wednesday, July  3, 2013 10:15 PM -07:00 from "Rocky Smolin" <rockysmolin at bchacc.com>:
> > Figuring out how to write a module without the use of GoTo is fun, a bit
> > challenging in some cases, and 'more elegant' as you say.
> > 
> > I use GoTo because it produces a nice clear sequence.  For example: If
> > condition true, then followed by 185 lines of code, followed by end if so
> > you have to go all the way to the end of the 185 lines to find out what
> > happens of the condition is false.
> > 
> > As opposed to If condition False then GoTo ExitModule:
> > 
> > Followed by 185 lines of code.
> > 
> > Rocky
> > 
> > 
> > -----Original Message-----
> > From: accessd-bounces at databaseadvisors.com
> > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan
> > Sent: Wednesday, July 03, 2013 3:25 PM
> > To: Access Developers discussion and problem solving
> > Subject: Re: [AccessD] VBA Field Names - Curiosity Question
> > 
> > Agree, what is the "danger of globals" if you:
> > 
> > a.  identify them properly using a naming convention b. use them properly by
> > only writing them in one location and c.  trap errors properly.
> > 
> > Same with Goto.  It's a perfectly valid command which does exactly the same
> > as the heavily used assembler JMP,JNE etc instructions. 
> > 
> > It's "abuse", not "use" that have given these two their bad reputations.
> > 
> > (But I haven't actually used a GOTO for many, many years - I've never found
> > a situation yet where there wasn't a "more elegant" solution <g>) 
> > 
> > --
> > Stuart
> > 
> > On 3 Jul 2013 at 9:04, Jim Dettman wrote:
> > 
> > > <<And don't get me started on the danger of globals.>>
> > > 
> > >   I've used globals since day 1 with Access; have never had a problem.
> > >  
> > >   It's sloppy programmers that write sloppy code that's the issue.
> > There's
> > > nothing inherently wrong with globals from my viewpoint.   They serve a
> > > purpose and like anything they work fine when used properly.
> > > 
> > >   It's like the age old admonishment never to use a goto statement.   You
> > > can use goto to your hearts content and still maintain well structured
> > code.
> > > It's a sloppy programmer that ends up with spaghetti code.
> > > 
> > > Jim. 
> > > 
> > 
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> > 
> > -- 
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> 
> 
> -- 
>  
> 
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com





More information about the AccessD mailing list