From: drieux <[EMAIL PROTECTED]> > On Wednesday, April 10, 2002, at 07:27 , Jenda Krynicky wrote: > > > From: drieux <[EMAIL PROTECTED]> > [..] > >> if the package assertion makes sense here > >> then this should be a Module > >> hence start with h2xs > > > > Well ... imagine you need some custom class of objects in your > > application or need to extend some class. Something small and > > specific so it doesn't deserve it's own file, but the functions and > > variables do have to belong to another package. > > [..] > Jenda, > > I have a problem with your argument - you begin by positing the > possible need for a sub Class in an application - and butress > your point by pointing towards PM's that do the package in package. > > { as previously noted, I have no fear of being merely pedantic.... } > > having 'packages in packages' - in PM's makes sense to me - > no problem there - it's the idea of trying to do this in > an application
Well I cannot give you an example to look at when it comes to scripts. Cause these are usualy not publicly available. > So it still remains > 'improbable' that one would want to do the "PM's" work inside > the application itself... Improbably yes, but forbidden no. > if anying trying to wedgie this 'small subclass(es)' into an > application leads into a "maze of twisty little passages all the same" > - with the Fanged Beast Creature of code maintenance hell looming > large. If you'd happen to need several packages or the script started to grow big then of course it would be best to move the package to a module. But sometimes if the package is really small, the script is not going to be extended much etc. etc. etc. it's not worth the hassle. That's all. Even if you do not introduce packages into the main script you still have to think all the time whether this should still be part of the script or should be moved into a module. Whether this is so specific that it's not worth making into a fullblown installed module or whether it only was moved out to a separate file to keep the main script maintainable, but only belongs to that script. One has to be carefull here and one has to try to do things as general and reusable as possible with reasonable effort. But we've drifted to coding style issues and those tend to be overly personal and a bit fuzzy anyway. And tend to lead to flamewars which I'd really hate to get into. Anyway ... to sum this all up I'd say: 1) If you are not sure you know whadaheck package means ... don't use it in your code. 2) If you introduce another package in a script ... consider moving the code into a separate file and truning into a fullblown reuseable module. You don't have to, but it might be better. 3) Keep your scripts short and clean. If you start getting lost it's more than time to consider breaking the file into several. Agreed? :-) Jenda =========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ========== There is a reason for living. There must be. I've seen it somewhere. It's just that in the mess on my table ... and in my brain I can't find it. --- me -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]