Re: Passing values between procedures(without actually passing them)
Date: Sat, 30 Jan 2010 08:50:52 -0500
Tim X <timx_at_nospam.dev.null> writes:
> LPF <eng.lpsff_at_gmail.com> writes:
>> It's possible to achieve something like this?
>> Procedure1(param1,param2) IS
>> end Procedure1;
>> Procedure2 IS
>> --Know the parameters values of Procedure1 at this point(with
>> dbms_debug, dbms_trace, some V$, ....)
>> end Procedure2;
>> The point to this is that i have a lot of procedures(like Procedure1)
>> calling a Procedure(Procedure2).
>> So if this could be achieved, i only have to use a simple line like
>> "Procedure2;" to all procedures(and with the advantage of not being
>> dependent of the number of parameteres, so future changes wouldn't
>> affect the Procedure2 call).
> DO NOT DO IT!
> this is such a bad idea on so many levels, I can't even begin to list
> them all. I also doubt it will work technically and even if it did, you
> are likely to be in all sorts of mess when the oracle version changes.
> essentialy, you may as well code your whole thing as one huge procedure
> because doing it how you suggest would be about the same. You would lose
> all the benefits of scoping, would rely on side effects, would run itno
> all sorts of type issues, would cripple system efficiency and wuld
> create a monster that cannot be maintained or easily tested.
> Programmers should be lazy, but not that lazy. Use decent tools and
> the changes your talking about are not a problem. In fact, they are a
> benefit as you can make changes and easily identify and test what has
> been modified and you only need to understand the bit of code your
> changing, not the whole system with its hidden side effects.
Its just the OO world dude. Instead of calling methods with parameters, you instantiate objects, set their instance variables and then have the object operate.
Oracle's object oriented features are superb, and I'm not talking about just using object types, I'm talking about using OO. At the end of the day, its all still SQL and PLSQL.
-- Galen Boyer --- news://freenews.netfront.net/ - complaints: news_at_netfront.net ---Received on Sat Jan 30 2010 - 07:50:52 CST