Re: python without OO

2005-01-27 Thread michele . simionato
Davor wrote: Thanks, I do not hate OO - I just do not need it for the project size I'm dealing with - and the project will eventually become open-source and have additional developers - so I would prefer that we all stick to simple procedural stuff rather than having to deal with a developer

Re: python without OO

2005-01-27 Thread Timo Virkkala
Davor wrote: Timo Virkkala wrote: This guy has got to be a troll. No other way to understand. not really - it was not my intention at all - but it seems people get upset whenever this OO stuff is mentioned - and what I did not expect at all at this forum as I believed Python people should not be

Re: python without OO

2005-01-27 Thread Peter Maas
Terry Reedy schrieb: But if the class method syntax were manditory, there would be class and/or class hierarchy bloat due to the unlimited number of possible functions-of-a-float and large number of actual such functions that have been written. You are right. I'm not an OO purist, I just wanted

Re: python without OO

2005-01-27 Thread Peter Maas
Davor schrieb: I browsed docs a bit today, and they also confirm what I have believed - that OO is totally secondary in Python. OO is not secondary in Python. It's secondary for you :) And Python leaves the choice to you. In fact, object/classes/metaclasses are nothing but *dictionaries with

Re: python without OO

2005-01-27 Thread Nick Coghlan
[EMAIL PROTECTED] wrote: Then why was C++ invented? What you have described can be done in C, Pascal, and Fortran 90, all of which are generally classified as procedural programming languages. As Lutz and Ascher say in Learning Python, in object-based programming one can pass objects around, use

Re: python without OO

2005-01-27 Thread Nick Coghlan
Davor wrote: data structures and functions that operate on these data structures Eh? What do you think a class is? Py data = range(10) Py list.extend(data, range(5)) Py list.sort(data) Py print data [0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 6, 7, 8, 9] The fact that data.extend(range(5)) and data.sort()

Re: python without OO

2005-01-27 Thread Peter Maas
[EMAIL PROTECTED] schrieb: Davor is right: even if you do not want to use it, the stuff is *there* and somebody in your team will. So definitely there is an audience of programmers that just do not have an use for all the sophistication and actually are penalized by it. No, because Python does not

Re: python without OO

2005-01-27 Thread Nick Coghlan
[EMAIL PROTECTED] wrote: Furthermore, if in Python the algorithm for the reverse function applies to many kinds of objects, it just needs to be coded once, whereas a reverse method would have to provided for each class that uses it (perhaps through inheritance). Indeed, this is why Python not only

Re: python without OO

2005-01-27 Thread michele . simionato
Peter Maas: [EMAIL PROTECTED] schrieb: Davor is right: even if you do not want to use it, the stuff is *there* and somebody in your team will. So definitely there is an audience of programmers that just do not have an use for all the sophistication and actually are penalized by it. No,

Re: python without OO

2005-01-27 Thread Alex Martelli
[EMAIL PROTECTED] wrote: ... Some complexity is not needed, and I am sure even in Python something could be dropped. But it is difficult to find what can be removed. Remember that Saint-Exupery quote? Something like a work of art is finished when there is nothing left to remove?

Re: python without OO

2005-01-27 Thread Alex Martelli
PA [EMAIL PROTECTED] wrote: Yes. But even with the best tool and the best intents, projects still fail. In fact, most IT projects are considered failures: http://www.economist.com/business/PrinterFriendly.cfm?Story_ID=3423238 The main thesis of the article you quote (although it

Re: python without OO

2005-01-27 Thread beliavsky
[EMAIL PROTECTED] wrote: There is not much than can be done at the Python level. But I would see with interest a Python spinoff geared towards simplicity. I think this would be useless because advanced concepts exist for a reason. A simplified spin-off would aquire advanced concepts over

Re: python without OO

2005-01-27 Thread michele . simionato
Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away. Thanks, that was it! ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: python without OO

2005-01-27 Thread Dave Benjamin
Davor wrote: Is it possible to write purely procedural code in Python, or the OO constructs in both language and supporting libraries have got so embedded that it's impossible to avoid them? Also, is anyone aware of any scripting language that could be considered as Python minus OO stuff? (As you

Re: python without OO

2005-01-27 Thread Jeff Shannon
Davor wrote: so you get a nice program with separate data structures and functions that operate on these data structures, with modules as containers for both (again ideally separated). Very simple to do and maintain [...] Replace modules with classes in the above quote, and you have the very

Re: python without OO

2005-01-27 Thread Joe Francia
Timo Virkkala wrote: This guy has got to be a troll. No other way to understand. -- Timo Virkkala Not a troll, just another case of premature optimization run amok. -- http://mail.python.org/mailman/listinfo/python-list

Re: python without OO

2005-01-26 Thread Alex Martelli
Davor [EMAIL PROTECTED] wrote: no one ever had to document structured patterns - which definitely exist - but seem to be obvious enough that there is no need to write a book about them... You _gotta_ be kidding -- what do you think, e.g., Wirth's Algorithms plus Data Structures Equals

Re: python without OO

2005-01-26 Thread Claudio Grondi
I can't resist to point here to the Re: How to input one char at a time from stdin? posting in this newsgroup to demonstrate, what this thread is about. Claudio On Tue, 25 Jan 2005 12:38:13 -0700, Brent W. Hughes [EMAIL PROTECTED] wrote: I'd like to get a character from stdin, perform some

Re: python without OO

2005-01-26 Thread Fuzzyman
It's perfectly possible to write good python code without using classes. (and using functions/normal control flow). You will have a problem with terrminology though - in python everything is an object (more or less). Common operations use attributes and methods of standard objects. For example :

Re: python without OO

2005-01-26 Thread Premshree Pillai
? Python is like pseudocode (the basic OO, which is mostly common to most OO languages, isn't really complicated). Moreover, using Python without OO would be like, um, eating mango seed without the pulp. :) -- http://mail.python.org/mailman/listinfo/python-list -- Premshree Pillai http

Re: python without OO

2005-01-26 Thread Miki Tebeka
Hello Davor, Also, is anyone aware of any scripting language that could be considered as Python minus OO stuff? Maybe Lisp (http://clisp.cons.org/, http://www.paulgraham.com/onlisp.html) or Scheme (http://www.plt-scheme.org/software/mzscheme/,

Re: python without OO

2005-01-26 Thread Neil Benn
Davor wrote: Is it possible to write purely procedural code in Python, or the OO constructs in both language and supporting libraries have got so embedded that it's impossible to avoid them? Also, is anyone aware of any scripting language that could be considered as Python minus OO stuff? (As you

Re: python without OO

2005-01-26 Thread Peter Maas
Davor schrieb: so initially I was hoping this is all what Python is about, but when I started looking into it it has a huge amount of additional (mainly OO) stuff which makes it in my view quite bloated now. So you think f.write('Hello world') is bloated and file_write(f,'Hello world') is not?

Re: python without OO

2005-01-26 Thread Thomas Bartkus
Davor [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On the other hand, this does beggar for a reason to bother with Python at all. It seems you could be happy doing BASH scripts for Linux or DOS batch files for Windows. Both are nicesimple scripting languages free of object

Re: python without OO

2005-01-26 Thread beliavsky
Peter Maas wrote: Davor schrieb: so initially I was hoping this is all what Python is about, but when I started looking into it it has a huge amount of additional (mainly OO) stuff which makes it in my view quite bloated now. So you think f.write('Hello world') is bloated and

Re: python without OO

2005-01-26 Thread Terry Reedy
Peter Maas [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Davor schrieb: so initially I was hoping this is all what Python is about, but when I started looking into it it has a huge amount of additional (mainly OO) stuff which makes it in my view quite bloated now. So you

Re: python without OO

2005-01-26 Thread Francis Girard
Le mercredi 26 Janvier 2005 02:43, Jeff Shannon a écrit : In statically typed languages like C++ and Java, inheritance trees are necessary so that you can appropriately categorize objects by their type. Since you must explicitly declare what type is to be used where, you may need fine

Re: python without OO

2005-01-26 Thread PA
On Jan 26, 2005, at 20:39, Francis Girard wrote: When I think that comapnies pay big money for these kind of monsters after having seen a few ppt slides about it, it makes me shiver. Right... but... since when does an implementation language of any sort save a project from its own doom? Project

Re: python without OO

2005-01-26 Thread Francis Girard
Le mercredi 26 Janvier 2005 20:47, PA a écrit : Project fails for many reasons but seldomly because one language is better or worst than another one. I think you're right. But you have to choose the right tools that fit your needs. But I think that's what you meant anyway. Cheers Cheers

Re: python without OO

2005-01-26 Thread Frans Englich
On Wednesday 26 January 2005 18:55, Terry Reedy wrote: Your Four Steps to Python Object Oriented Programming - vars, lists, dicts, and finally classes is great. It makes this thread worthwhile. I saved it and perhaps will use it sometime (with credit to you) to explain same to others. I

Re: python without OO

2005-01-26 Thread PA
On Jan 26, 2005, at 21:35, Francis Girard wrote: Project fails for many reasons but seldomly because one language is better or worst than another one. I think you're right. But you have to choose the right tools that fit your needs. But I think that's what you meant anyway. Yes. But even with the

Re: python without OO

2005-01-26 Thread Francis Girard
Le mercredi 26 Janvier 2005 21:44, PA a écrit : On Jan 26, 2005, at 21:35, Francis Girard wrote: Project fails for many reasons but seldomly because one language is better or worst than another one. I think you're right. But you have to choose the right tools that fit your needs. But

Re: python without OO

2005-01-26 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], Frank Bechmann (w) wrote: know what's funny: in the Lua mailing list there is currently a discussion about adding OO to Lua. From my quick glance at the language last year I recall that one can access elements of tables (in Python: dict()) with this syntax: ``tbl.attr``

Re: python without OO

2005-01-26 Thread beliavsky
Nick Coghlan wrote: Davor wrote: thanks for the link know what's funny: in the Lua mailing list there is currently a discussion about adding OO to Lua. I guess most of these newer languages have no choice but to support OO if they want to attract a larger user base :-(... Tell

Re: python without OO

2005-01-26 Thread Timo Virkkala
This guy has got to be a troll. No other way to understand. -- Timo Virkkala -- http://mail.python.org/mailman/listinfo/python-list

Re: python without OO

2005-01-26 Thread Davor
Timo Virkkala wrote: This guy has got to be a troll. No other way to understand. not really - it was not my intention at all - but it seems people get upset whenever this OO stuff is mentioned - and what I did not expect at all at this forum as I believed Python people should not be so OO

Re: python without OO

2005-01-26 Thread John Hunter
Davor == Davor [EMAIL PROTECTED] writes: Davor not really - it was not my intention at all - but it seems Davor people get upset whenever this OO stuff is mentioned - and Davor what I did not expect at all at this forum as I believed Davor Python people should not be so OO

Re: python without OO

2005-01-26 Thread Davor
I'd like to thank everyone for their replies. The main important lesson I got is: Python does not have that many issues with misuse of OO as compared to Java/C++ because it's *dynamically* typed language and extremely powerful *dictionary* data structure. I browsed docs a bit today, and they

Re: python without OO

2005-01-26 Thread beliavsky
John Hunter wrote: Davor == Davor [EMAIL PROTECTED] writes: Davor not really - it was not my intention at all - but it seems Davor people get upset whenever this OO stuff is mentioned - and Davor what I did not expect at all at this forum as I believed Davor Python people

Re: python without OO

2005-01-26 Thread Casey Hawthorne
The object-oriented programming paradigm has an undeserved reputation as being complicated; most of the complexity of languages such as C++ and Java has nothing to do with their object orientation but comes instead from the type declarations and the mechanisms to work around them. This is a prime

Re: python without OO

2005-01-26 Thread John Hunter
beliavsky == beliavsky [EMAIL PROTECTED] writes: beliavsky I think the OO way is slightly more obscure. It's beliavsky obvious what x = reverse(x) does, but it is not clear beliavsky unless you have the source code whether x.reverse() You don't need to read the src, you just need

Re: python without OO

2005-01-26 Thread Isaac To
beliavsky == beliavsky [EMAIL PROTECTED] writes: beliavsky I think the OO way is slightly more obscure. It's beliavsky obvious what x = reverse(x) does, but it is not clear beliavsky unless you have the source code whether x.reverse() beliavsky reverses x or if it returns a

Re: python without OO

2005-01-26 Thread Craig Ringer
On Wed, 2005-01-26 at 22:28 -0500, Davor wrote: I browsed docs a bit today, and they also confirm what I have believed - that OO is totally secondary in Python. In fact, object/classes/metaclasses are nothing but *dictionaries with identity* in python. Love this approach. I was really

python without OO

2005-01-25 Thread Davor
Is it possible to write purely procedural code in Python, or the OO constructs in both language and supporting libraries have got so embedded that it's impossible to avoid them? Also, is anyone aware of any scripting language that could be considered as Python minus OO stuff? (As you can see I'm

Re: python without OO

2005-01-25 Thread Jarek Zgoda
Davor wrote: Is it possible to write purely procedural code in Python, or the OO constructs in both language and supporting libraries have got so embedded that it's impossible to avoid them? Sure, but you will got problem with libraries. Some of them are in fact frameworks and need some

Re: python without OO

2005-01-25 Thread Thomas Bartkus
Davor [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Is it possible to write purely procedural code in Python, ... Of course! or the OO constructs in both language and supporting libraries have got so embedded that it's impossible to avoid them? You can always *write your own*

Re: python without OO

2005-01-25 Thread M.E.Farmer
Wrap your head around Python, don't wrap the Python around your head! This is NOT Java, or C++ or C , it IS Python. Davor wrote: (note, I am not an experienced developer, nor the others I'll be working with (even though some think they are:-)) Don't worry we didn't get confused, it was quite

Re: python without OO

2005-01-25 Thread Davor
Thanks, I do not hate OO - I just do not need it for the project size I'm dealing with - and the project will eventually become open-source and have additional developers - so I would prefer that we all stick to simple procedural stuff rather than having to deal with a developer that will be

Re: python without OO

2005-01-25 Thread Davor
On the other hand, this does beggar for a reason to bother with Python at all. It seems you could be happy doing BASH scripts for Linux or DOS batch files for Windows. Both are nicesimple scripting languages free of object oriented contamination. not really, what I need that Python has and

Re: python without OO

2005-01-25 Thread Michael Spencer
Davor wrote: Thanks, I do not hate OO - I just do not need it for the project size I'm dealing with - and the project will eventually become open-source and have additional developers - so I would prefer that we all stick to simple procedural stuff rather than having to deal with a developer that

Re: python without OO

2005-01-25 Thread Davor
M.E.Farmer wrote: Wrap your head around Python, don't wrap the Python around your head! This is NOT Java, or C++ or C , it IS Python. that's interesting hypothesis that behavior will vary due to the use of different language - actually most python scripts that I have seen do not even use OO

Re: python without OO

2005-01-25 Thread richard
Davor wrote: M.E.Farmer wrote: Wrap your head around Python, don't wrap the Python around your head! This is NOT Java, or C++ or C , it IS Python. that's interesting hypothesis that behavior will vary due to the use of different language - actually most python scripts that I have seen do

Re: python without OO

2005-01-25 Thread Erik Johnson
Davor [EMAIL PROTECTED] wrote I do not hate OO - I just do not need it for the project size I'm dealing with - and the project will eventually become open-source and have additional developers... If you think your project is valuable enough to eventually be Open Source, you can bet that

Re: python without OO

2005-01-25 Thread Jeff Shannon
Davor wrote: [...] what I need that Python has and bashdos don't is: 1. portability (interpreter runs quite a bit architectures) 2. good basic library (already there) 3. modules for structuring the application (objects unnecessary) 4. high-level data structures (dictionaries lists) 5. no strong

Re: python without OO

2005-01-25 Thread Jeremy Bowers
On Tue, 25 Jan 2005 15:01:23 -0800, Davor wrote: Thanks, I do not hate OO - I just do not need it for the project size I'm dealing with - and the project will eventually become open-source and have additional developers - so I would prefer that we all stick to simple procedural stuff

Re: python without OO

2005-01-25 Thread Jeff Shannon
Davor wrote: M.E.Farmer wrote: Wrap your head around Python, don't wrap the Python around your head! This is NOT Java, or C++ or C , it IS Python. that's interesting hypothesis that behavior will vary due to the use of different language ... If using a different language doesn't

Re: python without OO

2005-01-25 Thread M.E.Farmer
Davor, I was gonna let it go but I never was good at shutin up ;) The greatest strength a manager can have is delegation. And with that add the ability to best use the resources available . It seems you are telling me that : 1) You do not understand most programming concepts 2) You are not

Re: python without OO

2005-01-25 Thread Frank Bechmann (w)
even if I follow the other answers above - language-wise and management-advise-wise - just for the sake of completeness - I would like to point you to Lua: http://www.lua.org/ 1. portability (interpreter runs quite a bit architectures) = yes, nearly pure ANSI-C should compile 2. good

Re: python without OO

2005-01-25 Thread Davor
M.E.Farmer, first to clarify few things - I'm neither manager nor professionally involved in code development - I'm just embarking on a small project that I would like to attract some programmers to later on and make it a nice open-source system. Based on my previous experience with few SMALL

Re: python without OO

2005-01-25 Thread Davor
thanks for the link know what's funny: in the Lua mailing list there is currently a discussion about adding OO to Lua. I guess most of these newer languages have no choice but to support OO if they want to attract a larger user base :-(... davor --

Re: python without OO

2005-01-25 Thread Terry Reedy
Davor, Before I learned Python, I too was put off by OO hype. And I suppose I still would be if I still listened to it. But Python's class statement is somewhere inbetween a C typedef and C++/Jave classes. Stripped down pretty much to the essentials and only used when really useful, it made

Re: python without OO

2005-01-25 Thread Nick Coghlan
Davor wrote: thanks for the link know what's funny: in the Lua mailing list there is currently a discussion about adding OO to Lua. I guess most of these newer languages have no choice but to support OO if they want to attract a larger user base :-(... Tell me, have you ever defined a C