Re: Questions about app design - OOP with python classes

2007-03-04 Thread greg
John Nagle wrote: > The Pascal/Ada/Modula family of languages all had type systems > with restrictions on conversion. Unlike C, types in Pascal > are not simply abbreviations of the type; they're unique types. Ada is the only one of those that would let you define things like "a new kind of

Re: Questions about app design - OOP with python classes

2007-03-04 Thread greg
Paul Rubin wrote: > Maybe we can concoct a cross between Python and Haskell, and call it > "Paskell" after the philosopher Blaise ;-). No, we name it after Pascall's confectionery: http://www.homesick-kiwi.com/productpage.php?id=51 Lots of syntactic sugar. :-) -- Greg -- http://mail.python

Re: Questions about app design - OOP with python classes

2007-03-03 Thread John Nagle
Steven D'Aprano wrote: > On Fri, 02 Mar 2007 09:30:20 +0100, Diez B. Roggisch wrote: > > >>>A type system doesn't help. So what if they're both floats? The test >>>is still bogus, your code will still wait too long to engage the >>>retro-rockets, and the billion dollar space craft will still be t

Re: Questions about app design - OOP with python classes

2007-03-03 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > Unless there is a type system that can automatically deal with the > semantic difference between (say) screen coordinates and window > coordinates, or between height and width, or safe and unsafe strings, the > coder still has to deal with it themselves

Re: Questions about app design - OOP with python classes

2007-03-03 Thread Steven D'Aprano
On Thu, 01 Mar 2007 21:53:09 -0800, Paul Rubin wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: >> > That still sounds like an unreliable manual type system, >> It's unreliable in the sense that the coder has to follow the naming >> convention, and must have some bare minimum of sense. If you

Re: Questions about app design - OOP with python classes

2007-03-03 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > > Multi-Level-Specification allows you to > > express physical quantities with their respective unit, and operations > > on them to yield the combined unit at compile-time. There are some > > rather complicated cases where simple unification won't so

Re: Questions about app design - OOP with python classes

2007-03-03 Thread Steven D'Aprano
On Fri, 02 Mar 2007 09:30:20 +0100, Diez B. Roggisch wrote: >> A type system doesn't help. So what if they're both floats? The test >> is still bogus, your code will still wait too long to engage the >> retro-rockets, and the billion dollar space craft will still be travelling >> at hundreds of mi

Re: Questions about app design - OOP with python classes

2007-03-02 Thread MRAB
On Mar 2, 4:47 am, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Thu, 01 Mar 2007 20:24:33 -0800, Paul Rubin wrote: > > Steven D'Aprano <[EMAIL PROTECTED]> writes: > >> But if you used Apps Hungarian, and saw this line of code: > > >> if hmmCurrentHeight <= hinCriticalHeight: > > >> then you shou

Re: Questions about app design - OOP with python classes

2007-03-02 Thread GHUM
> > if hmmCurrentHeight <= hinCriticalHeight: > then you should instantly recognise that there's a problem. all civilized nations but one use metric systems. Of course there is a problem if you spot inches somewhere. Harald -- http://mail.python.org/mailman/listinfo/python-list

Re: Questions about app design - OOP with python classes

2007-03-02 Thread [EMAIL PROTECTED]
On 2 mar, 05:14, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Thu, 01 Mar 2007 21:45:55 +0100, Bruno Desthuilliers wrote: > > As a side note : hungarian notation is usually considered bad form here. > > Look here for usual naming conventions: > >http://www.python.org/dev/peps/pep-0008/ > > Which

Re: Questions about app design - OOP with python classes

2007-03-02 Thread Diez B. Roggisch
> A type system doesn't help. So what if they're both floats? The test > is still bogus, your code will still wait too long to engage the > retro-rockets, and the billion dollar space craft will still be travelling > at hundreds of miles an hour when it reaches the surface of Mars. A type system _

Re: Questions about app design - OOP with python classes

2007-03-01 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > > That still sounds like an unreliable manual type system, > It's unreliable in the sense that the coder has to follow the naming > convention, and must have some bare minimum of sense. If your coders are > morons, no naming convention will save you. (

Re: Questions about app design - OOP with python classes

2007-03-01 Thread Erik Max Francis
Steven D'Aprano wrote: > A type system doesn't help. So what if they're both floats? The test > is still bogus, your code will still wait too long to engage the > retro-rockets, and the billion dollar space craft will still be travelling > at hundreds of miles an hour when it reaches the surface o

Re: Questions about app design - OOP with python classes

2007-03-01 Thread Steven D'Aprano
On Thu, 01 Mar 2007 20:24:33 -0800, Paul Rubin wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: >> But if you used Apps Hungarian, and saw this line of code: >> >> if hmmCurrentHeight <= hinCriticalHeight: >> >> then you should instantly recognise that there's a problem. Comparing >> a heigh

Re: Questions about app design - OOP with python classes

2007-03-01 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > But if you used Apps Hungarian, and saw this line of code: > > if hmmCurrentHeight <= hinCriticalHeight: > > then you should instantly recognise that there's a problem. Comparing > a height in millimetres to a height in inches is not a good thing to d

Re: Questions about app design - OOP with python classes

2007-03-01 Thread Steven D'Aprano
On Thu, 01 Mar 2007 21:45:55 +0100, Bruno Desthuilliers wrote: > As a side note : hungarian notation is usually considered bad form here. > Look here for usual naming conventions: > http://www.python.org/dev/peps/pep-0008/ Which Hungarian notation do you mean? If you mean the Windows "Systems H

Re: Questions about app design - OOP with python classes

2007-03-01 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > On Mar 1, 9:45 pm, Bruno Desthuilliers > <[EMAIL PROTECTED]> wrote: > > > I understand (I've been in wikipedia :-) ). Right now the Frame is the > controller as well > as the view. Yeps. Note that this is a common "simplification" of the MVC - Microsoft labelled i

Re: Questions about app design - OOP with python classes

2007-03-01 Thread adriancico
On Mar 1, 9:45 pm, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > As a side note : hungarian notation is usually considered bad form here. > Look here for usual naming > conventions:http://www.python.org/dev/peps/pep-0008/ Thanks for the tip. It's been too many years of VB6, and its difficult

Re: Questions about app design - OOP with python classes

2007-03-01 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > Hi > > I am working on a python app, an outliner(a window with a TreeCtrl > on the > left to select a document, and a RichTextBox at the right to edit the > current > doc). > > I am familiarized with OOP concepts and terms but I lack practical > experience >

Questions about app design - OOP with python classes

2007-03-01 Thread adriancico
Hi I am working on a python app, an outliner(a window with a TreeCtrl on the left to select a document, and a RichTextBox at the right to edit the current doc). I am familiarized with OOP concepts and terms but I lack practical experience , so any comment/tip/pointer to docs will be welco