[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EXPORT, IMPORT and FTPAPI



Hello,

Just FYI... I'm vehemently opposed to anything that uses import/export 
on a variable.

Just put the session management into it's own module, and use 
getters/setters to get the appropriate data for a given session number. 
  Many of FTPAPI's existing routines are really just setters as it is... 
  they can be incorporated into that module.

Some things that are MODS right now (wkDsASCII, wkDsEBCDIC, wkDSAsciiF, 
wkDSEBCDICF) don't really need to be MODS as they are only used once, 
and could be local variables to a routine named new_xlate() or some such 
thing.



On 10/18/2010 7:31 AM, Dennis Lovelady wrote:
> Thanks, Charles.
>
> That would seem cleaner - but the fact is, that’s what we have now, and as
> Scott indicted in the comments, the module is larger than we might lock.
> Maybe I'm missing something but I cannot envision a way to put all the
> references to MODS subfields into one module without limiting ourselves to
> only that one module, since the multi-occurrence variables are used all over
> the place.  (Consider, for example, wkErrNum, which is a subfield of MODS
> wkSession...)  So I'm interested - how would you pull this off?  (It's a
> serious question; maybe I'm missing something important.)
>
> The only cleaner-looking way _I_ can come up with for this, is to use
> pointers exclusively, especially if we're going to keep V4 compatibility.
> But that would move the initialization of the variables away from their
> definitions.  Maybe that's not such a big deal, but I think there's value in
> having the definition tied to the initial values.  And I really like that
> one RESET can set a slew of variables to their initialization values.
> Apparently someone else liked that, too.
>
> Dennis Lovelady
> http://www.linkedin.com/in/dennislovelady
> --
> "Always live within your income, even if you have to borrow money to do so."
>          -- Josh Billings
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------