On Sat, Nov 16, 2013 at 3:01 PM, Rick Johnson
wrote:
> Because when i see code that accesses a variable like this:
>
> var = value
>
> I have no way of knowing whether the mutation is happening
> to a local variable, a module level variable, or even a true
> global level variable (one which ex
On Sat, Nov 16, 2013 at 3:01 PM, Rick Johnson
wrote:
> Let's see... Tkinter's design today is a single module
> containing a staggering:
>
> 155,626 chars
>
> 3,733 lines
Also: I see nothing wrong with a single module having 3-4K lines in
it. Hilfe, the Pike REPL/interactive interpreter,
On Friday, November 15, 2013 2:19:01 AM UTC-6, Steven D'Aprano wrote:
> But with software, coupling is *easy*. By default, code in
> a single process is completely coupled. Think of a chunk
> of machine code running in a single piece of memory. We
> have to build in our own conventions for decoupl
On 11/15/2013 09:42 AM, Chris Angelico wrote:
On Sat, Nov 16, 2013 at 2:26 AM, Tim Daneliuk wrote:
On 11/15/2013 02:19 AM, Steven D'Aprano wrote:
Nobody sets out to*design* a tangled mess. What normally happens is that
a tangled mess is the result of*lack of design*.
This has been an intere
On 11/15/2013 02:19 AM, Steven D'Aprano wrote:
Nobody sets out to*design* a tangled mess. What normally happens is that
a tangled mess is the result of*lack of design*.
This has been an interesting thread - to me anyway - but this bit
above caught my eye. People write programs for lots of rea
On Sat, Nov 16, 2013 at 2:26 AM, Tim Daneliuk wrote:
> On 11/15/2013 02:19 AM, Steven D'Aprano wrote:
>> Nobody sets out to*design* a tangled mess. What normally happens is that
>> a tangled mess is the result of*lack of design*.
>
> This has been an interesting thread - to me anyway - but this b
On Thu, 14 Nov 2013 09:26:18 -0800, Rick Johnson wrote:
> On Wednesday, November 13, 2013 11:50:40 PM UTC-6, Steven D'Aprano
> wrote:
[...]
>> of course, but that in general *its too damn hard* for human
>> programmers to write good, reliable, maintainable, correct (i.e.
>> bug-free) code using pr
On Fri, Nov 15, 2013 at 7:12 AM, Alister wrote:
> Ricks non trolling posts do give him enough credibility to avoid
> dismissing his ideas out of hand
When he's talking about Tkinter, he knows his stuff, and is orders of
magnitude more helpful than I would be (as I don't know Tkinter). When
he's t
On Thu, 14 Nov 2013 09:56:04 -0800, Ethan Furman wrote:
> On 11/14/2013 09:37 AM, Joel Goldstick wrote:
>>
>> So, beyond that, what is the point of the thread?
>
> You haven't met Ranting Rick yet? He's a troll's troll, outdone only by
> one other whose name I don't remember.
>
> His posts are,
On 14/11/2013 17:56, Ethan Furman wrote:
On 11/14/2013 09:37 AM, Joel Goldstick wrote:
So, beyond that, what is the point of the thread?
You haven't met Ranting Rick yet? He's a troll's troll, outdone only by
one other whose name I don't remember.
His posts are, amazingly enough, rants. Us
On Thu, Nov 14, 2013 at 12:56 PM, Ethan Furman wrote:
> On 11/14/2013 09:37 AM, Joel Goldstick wrote:
>>
>>
>> So, beyond that, what is the point of the thread?
>
>
> You haven't met Ranting Rick yet? He's a troll's troll, outdone only by one
> other whose name I don't remember.
>
> His posts are
On 11/14/2013 09:37 AM, Joel Goldstick wrote:
So, beyond that, what is the point of the thread?
You haven't met Ranting Rick yet? He's a troll's troll, outdone only by one
other whose name I don't remember.
His posts are, amazingly enough, rants. Usually about his (mis)perceptions of
the
On Thu, Nov 14, 2013 at 12:26 PM, Rick Johnson
wrote:
> On Wednesday, November 13, 2013 11:50:40 PM UTC-6, Steven D'Aprano wrote:
>> On Wed, 13 Nov 2013 19:45:42 -0800, Rick Johnson wrote:
>> > On Wednesday, November 13, 2013 8:45:16 PM UTC-6, Steven D'Aprano wrote:
>> >> A fully-auto machine gun
On Wednesday, November 13, 2013 11:50:40 PM UTC-6, Steven D'Aprano wrote:
> On Wed, 13 Nov 2013 19:45:42 -0800, Rick Johnson wrote:
> > On Wednesday, November 13, 2013 8:45:16 PM UTC-6, Steven D'Aprano wrote:
> >> A fully-auto machine gun with a hair-trigger and no
> >> safety is no different fro
On Thu, 14 Nov 2013 14:29:41 +1100, Chris Angelico wrote:
> On Thu, Nov 14, 2013 at 2:22 PM, Rick Johnson
> wrote:
>> Yeah, a "global" keyword that extends access ONLY as far as module
>> level scope -- hardly a *true* global.
>
> I have yet to see any language that gives true globals. At very b
On Wed, 13 Nov 2013 23:33:22 -0500, Roy Smith wrote:
> In article ,
> Chris Angelico wrote:
>
>> I have yet to see any language that gives true globals. At very best,
>> they're just process-wide! Honestly. How am I supposed to write code
>> that accesses variables running on my New York server
On Wed, 13 Nov 2013 19:45:42 -0800, Rick Johnson wrote:
> On Wednesday, November 13, 2013 8:45:16 PM UTC-6, Steven D'Aprano wrote:
>> A fully-auto machine gun with a hair-trigger and no
>> safety is no different from a single-barrel shotgun with a safety and
>> a trigger lock! You can blow your
On Thu, Nov 14, 2013 at 3:33 PM, Roy Smith wrote:
> In article ,
> Chris Angelico wrote:
>
>> I have yet to see any language that gives true globals. At very best,
>> they're just process-wide! Honestly. How am I supposed to write code
>> that accesses variables running on my New York server?
>
On Wednesday, November 13, 2013 10:33:22 PM UTC-6, Roy Smith wrote:
> Wait, aren't you the guy who's into MUDs?
Yes he is.
But that's his second favorite hobby.
His first is filling the "Devils Advocate" slot when
Steven is too busy -- doing WHATEVER Steven does when
he's not here. God only
In article ,
Chris Angelico wrote:
> I have yet to see any language that gives true globals. At very best,
> they're just process-wide! Honestly. How am I supposed to write code
> that accesses variables running on my New York server?
Any one of a slew of remote procedure call protocols. These
And what's this?
*picks up hat*
Where did this hat come from???
Spectator interrupts: Maybe Steven threw his hat in?
No, no.
Can't be.
Steven would not wear something this old.
I mean, it looks like something a farmer would put on a
scarecrow or something???
*scratched head*
OH
On Wednesday, November 13, 2013 8:45:16 PM UTC-6, Steven D'Aprano wrote:
> A fully-auto machine gun with a hair-trigger and no
> safety is no different from a single-barrel shotgun with
> a safety and a trigger lock! You can blow your foot off
> with both!
Yes. But in the case of the shotgun
On Thu, Nov 14, 2013 at 2:22 PM, Rick Johnson
wrote:
> Yeah, a "global" keyword that extends access ONLY as far as
> module level scope -- hardly a *true* global.
I have yet to see any language that gives true globals. At very best,
they're just process-wide! Honestly. How am I supposed to write
On Wednesday, November 13, 2013 7:09:42 PM UTC-6, Steven D'Aprano wrote:
> On Wed, 13 Nov 2013 23:42:24 +, Rhodri James wrote:
> > On Tue, 12 Nov 2013 02:06:09 -, Rick Johnson wrote:
> >> Python has globals, but we just can't admit it!
> > A different subject entirely, but no more accuratel
On Wed, 13 Nov 2013 18:10:59 -0800, Rick Johnson wrote:
> On Wednesday, November 13, 2013 5:42:24 PM UTC-6, Rhodri James wrote:
>> On Tue, 12 Nov 2013 02:06:09 -, Rick Johnson wrote:
>> > PyMyth: Global variables are evil... WRONG!
>> That's not a PyMyth. It
On Wednesday, November 13, 2013 6:17:22 PM UTC-6, Tim Daneliuk wrote:
> > But python modules can't be interfaces because interfaces
> > should protect internal data, prevent external forces from
> > meddling with internal state (EXCEPT via the rules of a
> > predefined "contract"), hide dirty detai
On Wednesday, November 13, 2013 4:00:15 PM UTC-6, Andrew Cooper wrote:
> And what do you do when the wizards bend space-time to
> make PI exactly 3, for the ease of other calculations when
> building a sorting machine?
Are you telling me that these wizards can't be bothered to
write the integer "3
On Wednesday, November 13, 2013 5:42:24 PM UTC-6, Rhodri James wrote:
> On Tue, 12 Nov 2013 02:06:09 -, Rick Johnson wrote:
> > PyMyth: Global variables are evil... WRONG!
> That's not a PyMyth. It's a CompSciMyth, or to be more
> accurate a good general Softw
On Wed, 13 Nov 2013 23:42:24 +, Rhodri James wrote:
> On Tue, 12 Nov 2013 02:06:09 -, Rick Johnson
> wrote:
>
>> PyMyth: Global variables are evil... WRONG!
>
> That's not a PyMyth. It's a CompSciMyth, or to be more accurate a good
> general Softwar
On 11/11/2013 10:46 PM, Rick Johnson wrote:
On Monday, November 11, 2013 8:47:09 PM UTC-6, Tim Daneliuk wrote:
I think this is certainly the use case most people would
suggest. But I think you may have missed the real reason
most modern designers object to inter-module globals: The
presence of
On 13/11/2013 23:42, Rhodri James wrote:
On Tue, 12 Nov 2013 02:06:09 -, Rick Johnson
wrote:
PyMyth: Global variables are evil... WRONG!
That's not a PyMyth. It's a CompSciMyth, or to be more accurate a good
general Software Engineering guideline regardless of language.
On Tue, 12 Nov 2013 02:06:09 -, Rick Johnson
wrote:
PyMyth: Global variables are evil... WRONG!
That's not a PyMyth. It's a CompSciMyth, or to be more accurate a good
general Software Engineering guideline regardless of language. Like all
guidelines it can be broken,
On 13/11/2013 02:45, Rick Johnson wrote:
>
> "math.pi" should be "math.PI". and PI should be a CONSTANT.
> And not just a pseudo constant, but a REAL constant that
> cannot be changed.
>
And what do you do when the wizards bend space-time to make PI exactly
3, for the ease of other calculation
On 2013-11-12 18:45, Rick Johnson wrote:
> "math.pi" should be "math.PI".
It's a real shame that this fails:
>>> math.PI = math.pi
oh...wait...
> and PI should be a CONSTANT. And not just a pseudo constant, but a
> REAL constant that cannot be changed.
How much precision do you want? Perhap
On Tuesday, November 12, 2013 4:41:34 PM UTC-6, jongiddy wrote:
> On Tuesday, November 12, 2013 5:00:37 PM UTC, Rick Johnson wrote:
> >1. Accept that globals are useful, and make them
> > available through a "real" global syntax, not
> > some attribute of a module that "appears" to
On 11/11/2013 11:46 PM, Rick Johnson wrote:
No, Python modules can be poked, prodded, and violated by
any pervert who can spell the word "import".
Or by clever programmers.
Attribute values can be reassigned and state can be
externally manipulated
Perhaps for good reasons.
resulting in a
On Tuesday, November 12, 2013 5:00:37 PM UTC, Rick Johnson wrote:
>
>
>1. Accept that globals are useful, and make them
>
> available through a "real" global syntax, not
>
> some attribute of a module that "appears" to be
>
> local, but in reality is global. Then prevent
On Tuesday, November 12, 2013 11:00:37 AM UTC-6, Rick Johnson wrote:
[snip]
> We have all been brainwashed by authorities. First they
> give us rules, then they give us the power to break
> those rules.
The devil himself said it best:
http://www.youtube.com/watch?v=RGR4SFOimlk
Hmm. How do we
On 2013-11-12 09:00, Rick Johnson wrote:
> Because the constant PI should never change. Sure we can
> argue about granularity of PI, but that argument has no
> weight on the fact that PI should be a constant.
>
> By placing PI in the module "math", we are creating a pseudo
> interface. We (the cre
On Tuesday, November 12, 2013 9:33:50 AM UTC-6, jongiddy wrote:
> I'm not sure where you get the feeling you're accessing an
> interface.
Because the constant PI should never change. Sure we can
argue about granularity of PI, but that argument has no
weight on the fact that PI should be a constant
On Tuesday, November 12, 2013 3:05:25 PM UTC, Rick Johnson wrote:
>
>
>
> When i type "math.pi", i "feel" as though i'm accessing an
>
> interface, BUT I'M NOT!
I'm not sure where you get the feeling you're accessing an interface. If I
typed this, I would feel like I was trying to change a f
On Wed, Nov 13, 2013 at 1:32 AM, Alister wrote:
> As an analogy music has may general rules that musicians are wise to
> follow.
> Some pieces of music that break these rules are great because they have
> broken the rules but most are not. those that are great are great because
> the musician in q
On Tuesday, November 12, 2013 8:12:10 AM UTC-6, jongiddy wrote:
> Can you please give an example where having a module
> provide a global variable would work better than any of:
> [snip]
Well my point is that the attributes of any Python module
are "emulating" globals already. The fact that we ha
On Mon, 11 Nov 2013 18:06:09 -0800, Rick Johnson wrote:
>
> In this thread, i want to get to the bottom of this whole
> "global-phobia" thing once and for all, and hopefully help you folks
> understand that globals are not all that bad -- when DESIGNED and USED
> correctly that is!
it is the fin
On Tuesday, November 12, 2013 2:06:09 AM UTC, Rick Johnson wrote:
>
>
>
> Justifying Global Variables:
>
>
>
> Globals are justified when they are used to communicate
>
>
On 2013-11-11 20:46, Rick Johnson wrote:
> Yes, and i agree. But you cannot "hide" everything. There
> will always be a need to share information.
You may not be able to (or want to) hide everything, but sharing
should at least happen over defined protocols (functions/methods).
Otherwise, you wand
El 12/11/13 01:46, Rick Johnson escribió:
No, Python modules can be poked, prodded, and violated by any pervert
who can spell the word "import". Attribute values can be reassigned
and state can be externally manipulated resulting in all types of
undefined behaviors --
Nice!
My code, my respo
On Tue, Nov 12, 2013 at 3:46 PM, Rick Johnson
wrote:
> But python modules can't be interfaces because interfaces
> should protect internal data, prevent external forces from
> meddling with internal state (EXCEPT via the rules of a
> predefined "contract"), hide dirty details from the caller,
> an
On Monday, November 11, 2013 8:47:09 PM UTC-6, Tim Daneliuk wrote:
> I think this is certainly the use case most people would
> suggest. But I think you may have missed the real reason
> most modern designers object to inter-module globals: The
> presence of such entities almost always means the c
On 11/11/2013 08:06 PM, Rick Johnson wrote:
Globals are justified when they are used to communicate
information between scopes that otherwise were meant to be
mutually exclusive.
I think this is certainly the use case most people would suggest.
But I think you may have missed the real reason
PyMyth: Global variables are evil... WRONG!
Python's Global Hysteria:
How many times have your heard or read the phrase: "Global
variables are evil"? Well i
51 matches
Mail list logo