Re: Declaring a Function Before it is used

new topic     » goto parent     » topic index » view thread      » older message » newer message

----- Original Message ----- 
From: "Ricardo Forno" <rmforno at tutopia.com>
To: <EUforum at topica.com>
Sent: Wednesday, October 29, 2003 4:22 PM
Subject: RE: Declaring a Function Before it is used
> 
> If your program really needs that, then it is not so simple. In fact, this
> is necessary only when you have two (or more) mutually recursive functions.
> Regards.

The other time it is 'necessary' is when the coder wishes to have the source
code structured in such a manner that it reflects the architecture of the
application. That's a fancy way of saying the I'd like to have related routines
physically close to each other in the source code.

With the current restriction in Euphoria, I am frequently moving routines around
the source files so that they can used - this is one of the reasns why Win32lib
is such a dog's breakfast. For example, I sometimes will change a routine so that
it now calls another routine, only to find that the routine I'm now calling is
further down the in the source file. So I must rearrange the code to accommodate
RDS's philosophy. And in doing so, I might suddenly find that I need to more more
than one (often unrelated) routine to get it 'just right'. In fact, I've gotten
so sick and tired of doing this that now I resort to routine_id() calls instead
of rearranging source code. Call me lazy, but it is not effective coding practice
(IMNSHO) to continually be concerned with juggling the physical layout of source
code.

The other language I deal with in a daily manner is Visual Basic, and that
language does not require either pre-declaration or restricted physical code
layouts. I can group my routines in a logical manner and not worry about where in
the source code a routine is physically coded in order for me to use it.

RDS is got this one wrong.

-- 
Derek

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu