×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
On 2/5/2018 12:09 PM, Richard Schoen wrote:
If a sub-procedure for some reason uses all the global program variables and is simply being used to encapsulate some looping logic or something similar, why not use a subroutine instead ?
I don't tend to write new subroutines, because the new code I write very
much tends to be designed as small sub-procedures - intentionally
designed that way from the outset. That said, when I do write a new
subroutine, it's specifically because I haven't yet refactored all the
global variables out of the code block. I don't do greenfield
programming, so refactoring is a way of life that is always in progress.
With respect to 'modern', I think the definition of 'modern' is 'well
rounded'. Which sounds like kicking the can down the road, but bear
with me for a tick.
If I never heard of a callback, how would I know when a callback is the
best practice? If I never heard of TDD, how would I know if/how to
write test suites? If I never heard of YAGNI, would my code be littered
with 'maybe some day...'?
You get the idea - the wider programming world has adopted standard
patterns for various situations, and only by reading of, or
participating in the wider community can we RPG programmers truly grok
'modern'.
As an Amazon Associate we earn from qualifying purchases.