Re: Article of interest: Python pros/cons for the enterprise

2008-03-02 Thread Paul Rubin
Robert Brown <[EMAIL PROTECTED]> writes: > Unfortunately, performance often comes at the cost of safety and > correctness. Optimized C programs can crash when pointers walk off the > end of arrays or they can yield incorrect results when integers overflow > the limits of the hardware. Yes, even u

Re: Article of interest: Python pros/cons for the enterprise

2008-02-28 Thread dave_mikesell
Good article. Re: the comparisons with C++, most of my experience is with C++ and I like it because it's powerful, flexible, portable, and keeps me employable. However, I can't think of any application or system I've written in C++ (or Java or Perl) that could not have been written in Python. In

Re: Article of interest: Python pros/cons for the enterprise

2008-02-28 Thread Robert Brown
Paul Rubin writes: > Robert Brown <[EMAIL PROTECTED]> writes: >> This is the approach taken by Common Lisp. Often just a few type >> declarations, added to code in inner loops, results in vastly faster code. > That is just a dangerous hack of improving performance by t

Re: Article of interest: Python pros/cons for the enterprise

2008-02-27 Thread Jeff Schwab
Aahz wrote: > In article <[EMAIL PROTECTED]>, > Carl Banks <[EMAIL PROTECTED]> wrote: >> On Feb 24, 7:03 pm, [EMAIL PROTECTED] (Aahz) wrote: >>> In article <[EMAIL PROTECTED]>, >>> Jeff Schwab <[EMAIL PROTECTED]> wrote: (3) Garbage collection is at least as desirable a language feature as >>

Re: Article of interest: Python pros/cons for the enterprise

2008-02-27 Thread Aahz
In article <[EMAIL PROTECTED]>, Carl Banks <[EMAIL PROTECTED]> wrote: >On Feb 24, 7:03 pm, [EMAIL PROTECTED] (Aahz) wrote: >> In article <[EMAIL PROTECTED]>, >> Jeff Schwab <[EMAIL PROTECTED]> wrote: >>> >>>(3) Garbage collection is at least as desirable a language feature as >>>deterministic des

Re: Article of interest: Python pros/cons for the enterprise

2008-02-26 Thread Matthew Woodcraft
Nicola Musatti <[EMAIL PROTECTED]> wrote: > Sebastian Kaliszewski <[EMAIL PROTECTED]> wrote: >> 3. You can't handle clean-up errors in reasonable way in C++ish approach, so >> anything more complex should not by handled that way anyway. > So it's okay for a Python mechanism to deal with 95% of th

Re: Article of interest: Python pros/cons for the enterprise

2008-02-26 Thread Steven D'Aprano
On Tue, 26 Feb 2008 06:35:21 -0800, Aaron Watters wrote: > I have found in the corporate > environment that managers frequently don't like it when you do in a few > days that things that they themselves don't know how to do in less than > several months. Especially when it makes the other program

Re: Article of interest: Python pros/cons for the enterprise

2008-02-26 Thread Nicola Musatti
On Feb 26, 2:23 pm, Carl Banks <[EMAIL PROTECTED]> wrote: > On Feb 26, 6:58 am, Paul Boddie <[EMAIL PROTECTED]> wrote: > > > The Lisp > > scene has also been plagued by an unnecessary deference to commercial > > interests, which means that the hottest topic on comp.lang.lisp right > > now is probab

Re: Article of interest: Python pros/cons for the enterprise

2008-02-26 Thread Jeff Schwab
Jeff Schwab wrote: > Nicola Musatti wrote: >> On Feb 24, 5:25 am, Paul Rubin wrote: >>> Jeff Schwab <[EMAIL PROTECTED]> writes: > there's actually a published book specifically about C++ pitfalls. Mercy, a whole book? >>> http://search.barnesandnoble.com/booksear

Re: Article of interest: Python pros/cons for the enterprise

2008-02-26 Thread Jeff Schwab
Nicola Musatti wrote: > On Feb 24, 5:25 am, Paul Rubin wrote: >> Jeff Schwab <[EMAIL PROTECTED]> writes: there's actually a published book specifically about C++ pitfalls. >>> Mercy, a whole book? >> http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?EAN=978

Re: Article of interest: Python pros/cons for the enterprise

2008-02-26 Thread Paul Rubin
Nicola Musatti <[EMAIL PROTECTED]> writes: > > http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?EAN=97802... > Read the title. This is about "C Traps and Pitfalls". Whoops, I think the same author wrote a similar one about C++. He hangs out here on this newsgroup sometimes. I didn't

Re: Article of interest: Python pros/cons for the enterprise

2008-02-26 Thread Aaron Watters
On Feb 25, 8:29 am, Nicola Musatti <[EMAIL PROTECTED]> wrote: > > And the migration to Python is due in large part because of an > > additional factor of 3-4x in personal productivity (over Java). > > Improvements in runtime performance wouldn't hurt, but for many > > applications that's not an iss

Re: Article of interest: Python pros/cons for the enterprise

2008-02-26 Thread Marc 'BlackJack' Rintsch
On Tue, 26 Feb 2008 05:23:11 -0800, Nicola Musatti wrote: > At least in C++ resource management only becomes more complicated if you > need more control. I think this is the point where so many people here disagree. I'm coming from a "garbage collection" background in OOP programming. In C++ re

Re: Article of interest: Python pros/cons for the enterprise

2008-02-26 Thread Carl Banks
On Feb 26, 6:58 am, Paul Boddie <[EMAIL PROTECTED]> wrote: > The Lisp > scene has also been plagued by an unnecessary deference to commercial > interests, which means that the hottest topic on comp.lang.lisp right > now is probably Paul Graham's much-anticipated but arguably > disappointing Lisp "s

Re: Article of interest: Python pros/cons for the enterprise

2008-02-26 Thread Nicola Musatti
On Feb 25, 3:59 pm, Sebastian Kaliszewski <[EMAIL PROTECTED]> wrote: [...] > 1. Your "generic" resource-management infrastructure is not generic to begin > with! It does not work for mutually dependant resources. How so? Could you give a concrete example? > 2. Your "generic" infrastructure increa

Re: Article of interest: Python pros/cons for the enterprise

2008-02-26 Thread Nicola Musatti
On Feb 24, 5:25 am, Paul Rubin wrote: > Jeff Schwab <[EMAIL PROTECTED]> writes: > > > there's actually a published book specifically about C++ pitfalls. > > > Mercy, a whole book? > > http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?EAN=97802... Read the title

Re: Article of interest: Python pros/cons for the enterprise

2008-02-26 Thread Nicola Musatti
On Feb 26, 12:58 pm, Paul Boddie <[EMAIL PROTECTED]> wrote: > On 25 Feb, 19:44, Nicola Musatti <[EMAIL PROTECTED]> wrote: > > > > > Witness the kind of > > libraries/framework that used to and still come with some commercial C+ > > + implementation, and even some free/open source ones; Boost, ACE a

Re: Article of interest: Python pros/cons for the enterprise

2008-02-26 Thread Paul Boddie
On 25 Feb, 19:44, Nicola Musatti <[EMAIL PROTECTED]> wrote: > > Witness the kind of > libraries/framework that used to and still come with some commercial C+ > + implementation, and even some free/open source ones; Boost, ACE and > wxWidgets are the first

Re: Article of interest: Python pros/cons for the enterprise

2008-02-25 Thread Paul Rubin
Robert Brown <[EMAIL PROTECTED]> writes: > > Python's dynamic typing is just fine. But if I know the type, I want > > the ability to nail it. ...local variables, arguments, return values, > > etc And if I don't know or care, I'd leave it to dynamic typing. > > This is the approach taken by Comm

Re: Article of interest: Python pros/cons for the enterprise

2008-02-25 Thread Robert Brown
Larry Bugbee <[EMAIL PROTECTED]> writes: > Python's dynamic typing is just fine. But if I know the type, I want > the ability to nail it. ...local variables, arguments, return values, > etc And if I don't know or care, I'd leave it to dynamic typing. This is the approach taken by Common Lisp.

Re: Article of interest: Python pros/cons for the enterprise

2008-02-25 Thread Aahz
In article <[EMAIL PROTECTED]>, Jeff Schwab <[EMAIL PROTECTED]> wrote: >Bruno Desthuilliers wrote: >> >> Stating the obvious is not bashing. In my last shop I was working with >> (very talented BTW) Perl programmer, and he was the first to make jokes >> on Perl's abuse of cryptic syntax. > >It'

Re: Article of interest: Python pros/cons for the enterprise

2008-02-25 Thread Nicola Musatti
On Feb 25, 3:17 pm, Carl Banks <[EMAIL PROTECTED]> wrote: > On Feb 25, 8:29 am, Nicola Musatti <[EMAIL PROTECTED]> wrote: > > > On Feb 24, 9:14 pm, Larry Bugbee <[EMAIL PROTECTED]> wrote: > > > Corporate marketing, and corporate attention in general, saw to it > > > that Java was well equipped with

Re: Article of interest: Python pros/cons for the enterprise

2008-02-25 Thread Paul Rubin
Nicola Musatti <[EMAIL PROTECTED]> writes: > > However, one of the consequences of programming in this style is > > you allocate a lot of temporary objects which best managed by GC. > > According to which metric? This statement appears as totally > gratuitous to me. You seem to forget that dealloc

Re: Article of interest: Python pros/cons for the enterprise

2008-02-25 Thread Sebastian Kaliszewski
Jeff Schwab wrote: >> You like managing your own memory, be my guest. But please don't >> imply that you're putting forth less effort because of it. You're >> just putting forth different effort. > > I disagree with you completely. Your points don't make any sense to me > at all. I believe I a

Re: Article of interest: Python pros/cons for the enterprise

2008-02-25 Thread Carl Banks
On Feb 25, 8:29 am, Nicola Musatti <[EMAIL PROTECTED]> wrote: > On Feb 24, 9:14 pm, Larry Bugbee <[EMAIL PROTECTED]> wrote: > > Corporate marketing, and corporate attention in general, saw to it > > that Java was well equipped with libraries and frameworks addressing > > enterprise application need

Re: Article of interest: Python pros/cons for the enterprise

2008-02-25 Thread Nicola Musatti
On Feb 24, 9:14 pm, Larry Bugbee <[EMAIL PROTECTED]> wrote: > On Feb 21, 10:22 am, Nicola Musatti <[EMAIL PROTECTED]> wrote: > > > On Feb 21, 6:31 pm, Paul Boddie <[EMAIL PROTECTED]> wrote: > > > > The main reason why C++ has declined in usage is because almost > > > everything of practical value i

Re: Article of interest: Python pros/cons for the enterprise

2008-02-25 Thread Nicola Musatti
On Feb 24, 1:01 am, Paul Rubin wrote: > Nicola Musatti <[EMAIL PROTECTED]> writes: > > >>>a = [f(x) + g(y) for x,y in izip(m1, m2) if h(x,y).frob() == 7] > > [...] > > > There you replace one line of code with 40+ lines to get around the > > > absence of GC. Sounds b

Re: Article of interest: Python pros/cons for the enterprise

2008-02-25 Thread Carl Banks
On Feb 24, 7:03 pm, [EMAIL PROTECTED] (Aahz) wrote: > In article <[EMAIL PROTECTED]>, > Jeff Schwab <[EMAIL PROTECTED]> wrote: > >(3) Garbage collection is at least as desirable a language feature as > >deterministic destruction. > > Enh. There probably are some people who claim that, but I can't

Re: Article of interest: Python pros/cons for the enterprise

2008-02-24 Thread Aahz
In article <[EMAIL PROTECTED]>, Jeff Schwab <[EMAIL PROTECTED]> wrote: > >What I would like is not so much a new Python implementation, as a >vehicle to help demonstrate a few things to other Python users. >Recently, I've had a few replies in tones that imply I'm on the brink of >entering sever

Re: Article of interest: Python pros/cons for the enterprise

2008-02-24 Thread Larry Bugbee
PS: And tools like ShedSkin and Pyrex benefit. -- http://mail.python.org/mailman/listinfo/python-list

Re: Article of interest: Python pros/cons for the enterprise

2008-02-24 Thread Larry Bugbee
> You mean static data typing, right? Are there any known holes in the > dynamic type system that still need to be plugged? (I haven't heard of > any.) My apologies. You are right, I meant optional, static typing. Thanks for the catch Jeff. Python's dynamic typing is just fine. But if I know

Re: Article of interest: Python pros/cons for the enterprise

2008-02-24 Thread Jeff Schwab
Larry Bugbee wrote: > And the migration to Python is due in large part because of an > additional factor of 3-4x in personal productivity (over Java). > Improvements in runtime performance wouldn't hurt, but for many > applications that's not an issue. (If optional data typing were You mean stat

Re: Article of interest: Python pros/cons for the enterprise

2008-02-24 Thread Larry Bugbee
On Feb 21, 10:22 am, Nicola Musatti <[EMAIL PROTECTED]> wrote: > On Feb 21, 6:31 pm, Paul Boddie <[EMAIL PROTECTED]> wrote: > > > > The main reason why C++ has declined in usage is because almost > > everything of practical value is optional. No, disagree. > The main reason why C++ has declined i

Re: Article of interest: Python pros/cons for the enterprise

2008-02-24 Thread Lou Pecora
In article <[EMAIL PROTECTED]>, Nicola Musatti <[EMAIL PROTECTED]> wrote: > On Feb 22, 12:07 pm, Paul Rubin wrote: > > Nicola Musatti <[EMAIL PROTECTED]> writes: > > > In C++ memory is just another resource which you can handle just like > > > any other one, possibly u

Re: Article of interest: Python pros/cons for the enterprise

2008-02-24 Thread Jeff Schwab
Matthew Woodcraft wrote: > Jeff Schwab <[EMAIL PROTECTED]> wrote: >> Matthew Woodcraft wrote: >>> I see. Then, unless you don't care about data loss passing silently, >>> this 'most traditional' way to open a file is unsuitable for files >>> opened for writing. > >> No, why would you think so? I

Re: Article of interest: Python pros/cons for the enterprise

2008-02-24 Thread Lou Pecora
Just some anecdotal confirmation: In article <[EMAIL PROTECTED]>, "Ryan Ginstrom" <[EMAIL PROTECTED]> wrote: > I personally used C++ for about 90% of my code for 10 years. During that > time, I was chugging the C++ Kool-Aid so hard I almost peed myself. I still > think that C++ is a beautiful la

Re: Article of interest: Python pros/cons for the enterprise

2008-02-24 Thread Matthew Woodcraft
Jeff Schwab <[EMAIL PROTECTED]> wrote: > Matthew Woodcraft wrote: >> I see. Then, unless you don't care about data loss passing silently, >> this 'most traditional' way to open a file is unsuitable for files >> opened for writing. > No, why would you think so? If you want something special to ha

Re: Article of interest: Python pros/cons for the enterprise

2008-02-24 Thread Arnaud Delobelle
On Feb 24, 8:08 am, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Sat, 23 Feb 2008 19:45:45 -0800, Jeff Schwab wrote: > The second link is just bizarre. It claims that Python "does not have > nested, block variable scopes like I am accustomed to in nearly every > other programm

Re: Article of interest: Python pros/cons for the enterprise

2008-02-24 Thread Steven D'Aprano
On Sat, 23 Feb 2008 19:45:45 -0800, Jeff Schwab wrote: > Paul Rubin wrote: >> Jeff Schwab <[EMAIL PROTECTED]> writes: >>> One great thing about C is that >>> a programmer can realistically hope to know the entire language >>> definition; maybe Guido would like the same to be true of Python. >> >>

Using lambda [was Re: Article of interest: Python pros/cons for the enterprise]

2008-02-23 Thread Steven D'Aprano
On Sat, 23 Feb 2008 19:35:30 -0800, Jeff Schwab wrote: > Every time somebody uses > lambda here, they seem to get a bunch "why are you using lambda?" > responses. Not from me. I even use "named anonymous functions" *cough* by assigning lambda functions to names: foo = lambda x: x+1 -- Stev

Re: Article of interest: Python pros/cons for the enterprise

2008-02-23 Thread Paul Rubin
Jeff Schwab <[EMAIL PROTECTED]> writes: > > languages should be a red flag in a design review, and a factor in > > determining product liability if a program misbehaves. > > Your product gets the benefit of the doubt if it was written in > Python, but not if written in C? What if the Python inter

Re: Article of interest: Python pros/cons for the enterprise

2008-02-23 Thread Jeff Schwab
Paul Rubin wrote: > Jeff Schwab <[EMAIL PROTECTED]> writes: >>> there's actually a published book specifically about C++ pitfalls. >> Mercy, a whole book? > > http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?EAN=9780201179286 > >>> C and C++ should practically be outlawed at this point

Re: Article of interest: Python pros/cons for the enterprise

2008-02-23 Thread Paul Rubin
Jeff Schwab <[EMAIL PROTECTED]> writes: > > there's actually a published book specifically about C++ pitfalls. > > Mercy, a whole book? http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?EAN=9780201179286 > > C and C++ should practically be outlawed at this point. > > On what grounds?

Re: Article of interest: Python pros/cons for the enterprise

2008-02-23 Thread Paul Rubin
Jeff Schwab <[EMAIL PROTECTED]> writes: > def mkadder(n): > return lambda x: x + n > > I have gotten the impression that this was somehow inferior in Python > though, at least in terms of performance. Every time somebody uses > lambda here, they seem to get a bunch "why are you usin

Re: Article of interest: Python pros/cons for the enterprise

2008-02-23 Thread Jeff Schwab
Paul Rubin wrote: > Jeff Schwab <[EMAIL PROTECTED]> writes: >> One great thing about C is that >> a programmer can realistically hope to know the entire language >> definition; maybe Guido would like the same to be true of Python. > > C is horrendously complicated, with zillions of obscure traps.

Re: Article of interest: Python pros/cons for the enterprise

2008-02-23 Thread Jeff Schwab
Paul Rubin wrote: > Jeff Schwab <[EMAIL PROTECTED]> writes: >> So to use the Perl example: If you want to sort a list using some >> arbitrary snippet of code as the comparison function, you can write: >> sort { code to compare $a and $b } @elements > > Yes, you can do that in Python, using a

Re: Article of interest: Python pros/cons for the enterprise

2008-02-23 Thread Jeff Schwab
Matthew Woodcraft wrote: > Jeff Schwab <[EMAIL PROTECTED]> wrote: >> Matthew Woodcraft wrote: >>> Jeff Schwab <[EMAIL PROTECTED]> wrote: The most traditional, easiest way to open a file in C++ is to use an fstream object, so the file is guaranteed to be closed when the fstream go

Re: Article of interest: Python pros/cons for the enterprise

2008-02-23 Thread Paul Rubin
Jeff Schwab <[EMAIL PROTECTED]> writes: > So to use the Perl example: If you want to sort a list using some > arbitrary snippet of code as the comparison function, you can write: > sort { code to compare $a and $b } @elements Yes, you can do that in Python, using a lambda expression, a named

Re: Article of interest: Python pros/cons for the enterprise

2008-02-23 Thread Paul Rubin
Jeff Schwab <[EMAIL PROTECTED]> writes: > One great thing about C is that > a programmer can realistically hope to know the entire language > definition; maybe Guido would like the same to be true of Python. C is horrendously complicated, with zillions of obscure traps. C++ is even worse; there's

Re: Article of interest: Python pros/cons for the enterprise

2008-02-23 Thread Jeff Schwab
Paul Rubin wrote: > "Terry Reedy" <[EMAIL PROTECTED]> writes: >> | Yes, this seems to be the Python way: For each popular feature of some >> | other language, create a less flexible Python feature that achieves the >> | same effect in the most common cases (e.g. lambda to imitate function >> | lit

Re: Article of interest: Python pros/cons for the enterprise

2008-02-23 Thread Jeff Schwab
Terry Reedy wrote: > "Jeff Schwab" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > [snip discussion of 'with' statements] > > | Yes, this seems to be the Python way: For each popular feature of some > | other language, create a less flexible Python feature that achieves the > | s

Re: Article of interest: Python pros/cons for the enterprise

2008-02-23 Thread Hrvoje Niksic
"Terry Reedy" <[EMAIL PROTECTED]> writes: > "Jeff Schwab" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > [snip discussion of 'with' statements] > > | Yes, this seems to be the Python way: For each popular feature of some > | other language, create a less flexible Python feature

Re: Article of interest: Python pros/cons for the enterprise

2008-02-23 Thread Paul Rubin
"Terry Reedy" <[EMAIL PROTECTED]> writes: > | Yes, this seems to be the Python way: For each popular feature of some > | other language, create a less flexible Python feature that achieves the > | same effect in the most common cases (e.g. lambda to imitate function > | literals, or recursive assi

Re: Article of interest: Python pros/cons for the enterprise

2008-02-23 Thread Terry Reedy
"Jeff Schwab" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] [snip discussion of 'with' statements] | Yes, this seems to be the Python way: For each popular feature of some | other language, create a less flexible Python feature that achieves the | same effect in the most common ca

Re: Article of interest: Python pros/cons for the enterprise

2008-02-23 Thread Paul Rubin
Nicola Musatti <[EMAIL PROTECTED]> writes: > >>>a = [f(x) + g(y) for x,y in izip(m1, m2) if h(x,y).frob() == 7] > [...] > > There you replace one line of code with 40+ lines to get around the > > absence of GC. Sounds bug-prone among other things. > > Come on, you didn't define f, g, izip, h

Re: Article of interest: Python pros/cons for the enterprise

2008-02-23 Thread Paul Rubin
Jeff Schwab <[EMAIL PROTECTED]> writes: > some_class().method() > The method body could create an external reference to the instance of > some_class, such that the instance would not be reclaimed at the end of > the statement. Yes. Therefore there is no way to predict if the object will be

Re: Article of interest: Python pros/cons for the enterprise

2008-02-23 Thread Matthew Woodcraft
Jeff Schwab <[EMAIL PROTECTED]> wrote: >Matthew Woodcraft wrote: >> Jeff Schwab <[EMAIL PROTECTED]> wrote: >>> The most traditional, easiest way to open a file in C++ is to use an >>> fstream object, so the file is guaranteed to be closed when the fstream >>> goes out of scope. >> Out of inte

Re: Article of interest: Python pros/cons for the enterprise

2008-02-23 Thread Jeff Schwab
Matthew Woodcraft wrote: > Jeff Schwab <[EMAIL PROTECTED]> wrote: >> The most traditional, easiest way to open a file in C++ is to use an >> fstream object, so the file is guaranteed to be closed when the fstream >> goes out of scope. > > Out of interest, what is the usual way to manage errors

Re: Article of interest: Python pros/cons for the enterprise

2008-02-23 Thread Matthew Woodcraft
Jeff Schwab <[EMAIL PROTECTED]> wrote: > The most traditional, easiest way to open a file in C++ is to use an > fstream object, so the file is guaranteed to be closed when the fstream > goes out of scope. Out of interest, what is the usual way to manage errors that the operating system reports

Re: Article of interest: Python pros/cons for the enterprise

2008-02-23 Thread Rhamphoryncus
On Feb 23, 11:39 am, Nicola Musatti <[EMAIL PROTECTED]> wrote: > Paul Rubin wrote: > > Nicola Musatti <[EMAIL PROTECTED]> writes: > >>>a = [f(x) + g(y) for x,y in izip(m1, m2) if h(x,y).frob() == 7] > [...] > > There you replace one line of code with 40+ lines to get around the > > absence of G

Re: Article of interest: Python pros/cons for the enterprise

2008-02-23 Thread Jeff Schwab
Carl Banks wrote: > On Feb 23, 6:40 am, Jeff Schwab <[EMAIL PROTECTED]> wrote: >> Recently, I've had a few replies in tones that imply I'm on the brink of >> entering several kill-files, mostly because I express disagreement with >> a few closely held beliefs of some other c.l.p posters. > > A bit

Re: Article of interest: Python pros/cons for the enterprise

2008-02-23 Thread Nicola Musatti
Paul Rubin wrote: > Nicola Musatti <[EMAIL PROTECTED]> writes: >>>a = [f(x) + g(y) for x,y in izip(m1, m2) if h(x,y).frob() == 7] [...] > There you replace one line of code with 40+ lines to get around the > absence of GC. Sounds bug-prone among other things. Come on, you didn't define f, g,

Re: Article of interest: Python pros/cons for the enterprise

2008-02-23 Thread Nicola Musatti
Marc 'BlackJack' Rintsch wrote: [...] > Or are used to think of OOP as a graph of objects that are communicating > with each other. In the value type style you are "talking" to copies of > objects all the time which I find a bit confusing because *I* have to keep > track of which maybe not so iden

Re: Article of interest: Python pros/cons for the enterprise

2008-02-23 Thread Carl Banks
On Feb 23, 6:40 am, Jeff Schwab <[EMAIL PROTECTED]> wrote: > Recently, I've had a few replies in tones that imply I'm on the brink of > entering several kill-files, mostly because I express disagreement with > a few closely held beliefs of some other c.l.p posters. A bit of advice: Python and C++

Re: Article of interest: Python pros/cons for the enterprise

2008-02-23 Thread Jeff Schwab
Paul Rubin wrote: > Jeff Schwab <[EMAIL PROTECTED]> writes: >> The most traditional, easiest way to open a file in C++ is to use an >> fstream object, so the file is guaranteed to be closed when the >> fstream goes out of scope. > > Python has this too, except it's using a special type of scope

Re: Article of interest: Python pros/cons for the enterprise

2008-02-23 Thread Jeff Schwab
Ryan Ginstrom wrote: >> On Behalf Of Jeff Schwab >> When I see this silliness again and again, it really breaks >> my heart > > If you allow your heart to be broken by others' opinions, you're setting > yourself up for a lot of disappointment IMHO. It's not so much their opinions, as the fact th

RE: Article of interest: Python pros/cons for the enterprise

2008-02-23 Thread Ryan Ginstrom
> On Behalf Of Jeff Schwab > When I see this silliness again and again, it really breaks > my heart If you allow your heart to be broken by others' opinions, you're setting yourself up for a lot of disappointment IMHO. I personally used C++ for about 90% of my code for 10 years. During that time

Re: Article of interest: Python pros/cons for the enterprise

2008-02-23 Thread Jeff Schwab
George Sakkis wrote: > On Feb 22, 2:15 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote: > >> Nicola Musatti wrote: >>> The real sad thing is that nobody is likely to convince Guido to turn >>> CPython into C++Python ;-) >> How difficult would that be? Could it be done in stages? I would be >> willing

Re: Article of interest: Python pros/cons for the enterprise

2008-02-23 Thread Jeff Schwab
Bruno Desthuilliers wrote: > Jeff Schwab a écrit : >> Bruno Desthuilliers wrote: >>> Carl Banks a écrit : On Feb 20, 8:58 am, Tim Chase <[EMAIL PROTECTED]> wrote: >> You Used Python to Write WHAT? >> http://www.cio.com/article/185350 > """ > Furthermore, the power and expressiv

Re: Article of interest: Python pros/cons for the enterprise

2008-02-22 Thread George Sakkis
On Feb 22, 2:15 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote: > Nicola Musatti wrote: > > The real sad thing is that nobody is likely to convince Guido to turn > > CPython into C++Python ;-) > > How difficult would that be? Could it be done in stages? I would be > willing to spend some time on that

Re: Article of interest: Python pros/cons for the enterprise

2008-02-22 Thread Jeff Schwab
Carl Banks wrote: > On Feb 22, 12:23 am, Jeff Schwab <[EMAIL PROTECTED]> wrote: >> Carl Banks wrote: >>> On Feb 21, 7:17 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote: Carl Banks wrote: > On Feb 21, 1:22 pm, Nicola Musatti <[EMAIL PROTECTED]> wrote: >> There are other downsides to garbage

Re: Article of interest: Python pros/cons for the enterprise

2008-02-22 Thread Jeff Schwab
Nicola Musatti wrote: > The real sad thing is that nobody is likely to convince Guido to turn > CPython into C++Python ;-) How difficult would that be? Could it be done in stages? I would be willing to spend some time on that kind of project. Since I know almost nothing about Python internal

Re: Article of interest: Python pros/cons for the enterprise

2008-02-22 Thread Paul Rubin
Nicola Musatti <[EMAIL PROTECTED]> writes: > >a = [f(x) + g(y) for x,y in izip(m1, m2) if h(x,y).frob() == 7] > > > > Consider how many intermediate objects are being allocated in figuring > > out that listcomp. Do you REALLY want to manage all the deallocation > > with something like RAII? >

Re: Article of interest: Python pros/cons for the enterprise

2008-02-22 Thread Paul Rubin
Nicola Musatti <[EMAIL PROTECTED]> writes: > > Partial guarantees are like being a little bit pregnant. > > Yes, and I'm sure your tests cover all possible paths through your code. That is the point of type checking. With a sound type system, "int x" makes sure, at compile time, that x stays an

Re: Article of interest: Python pros/cons for the enterprise

2008-02-22 Thread Nicola Musatti
On Feb 22, 5:13 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Fri, 22 Feb 2008 04:48:28 -0800, Nicola Musatti wrote: [...] > > As you can see the standard library takes care of all memory > > management. > > Aaah, that's much nicer and easier to understand than the list > comprehensi

Re: Article of interest: Python pros/cons for the enterprise

2008-02-22 Thread Marc 'BlackJack' Rintsch
On Fri, 22 Feb 2008 04:48:28 -0800, Nicola Musatti wrote: > On Feb 22, 12:07 pm, Paul Rubin wrote: >> Nicola Musatti <[EMAIL PROTECTED]> writes: >> > In C++ memory is just another resource which you can handle just like >> > any other one, possibly using RAII. >> >> Ok,

Re: Article of interest: Python pros/cons for the enterprise

2008-02-22 Thread Chris Mellon
On Fri, Feb 22, 2008 at 4:56 AM, Nicola Musatti <[EMAIL PROTECTED]> wrote: > On Feb 22, 12:24 am, Carl Banks <[EMAIL PROTECTED]> wrote: > > On Feb 21, 1:22 pm, Nicola Musatti <[EMAIL PROTECTED]> wrote: > > > > > There are other downsides to garbage collection, as the fact that it > > > makes it

Re: Article of interest: Python pros/cons for the enterprise

2008-02-22 Thread Nicola Musatti
On Feb 22, 3:25 pm, Roy Smith <[EMAIL PROTECTED]> wrote: > In article > <[EMAIL PROTECTED]>, > Nicola Musatti <[EMAIL PROTECTED]> wrote: > > > Yet I'm convinced that even such partial guarantee is worth having. > > Partial guarantees are like being a little bit pregnant. Yes, and I'm sure your te

Re: Article of interest: Python pros/cons for the enterprise

2008-02-22 Thread Lou Pecora
PM > > To: python-list@python.org > > Subject: Re: Article of interest: Python pros/cons for the enterprise > > > C++ is a compile-time, type-checked language, which means it is > > totally safer for newbies than Python. Yep, your big company is > > totally safe wi

Re: Article of interest: Python pros/cons for the enterprise

2008-02-22 Thread Roy Smith
In article <[EMAIL PROTECTED]>, Nicola Musatti <[EMAIL PROTECTED]> wrote: > Yet I'm convinced that even such partial guarantee is worth having. Partial guarantees are like being a little bit pregnant. -- http://mail.python.org/mailman/listinfo/python-list

Re: Article of interest: Python pros/cons for the enterprise

2008-02-22 Thread Bruno Desthuilliers
Nicola Musatti a écrit : > On Feb 22, 9:03 am, Bruno Desthuilliers [EMAIL PROTECTED]> wrote: >> Nicola Musatti a écrit : > [...] >>> So, yes, your big company is >>> likely to be safer with newbie C++ programmers than with Python newbie >>> programmers. >> Sorry but I don't buy your arguments. >

Re: Article of interest: Python pros/cons for the enterprise

2008-02-22 Thread Nicola Musatti
On Feb 22, 12:07 pm, Paul Rubin wrote: > Nicola Musatti <[EMAIL PROTECTED]> writes: > > In C++ memory is just another resource which you can handle just like > > any other one, possibly using RAII. > > Ok, I'll bite. Here's a straightforward Python expression: > >a =

Re: Article of interest: Python pros/cons for the enterprise

2008-02-22 Thread Paul Boddie
On 22 Feb, 06:37, George Sakkis <[EMAIL PROTECTED]> wrote: > Paul Rubin wrote: > > It just seems to me that there is a killer language just around the > > corner, with Python's ease-of-use but with a serious compile-time type > > system, maybe some kind of cross between ML and Python. > > Could Boo

Re: Article of interest: Python pros/cons for the enterprise

2008-02-22 Thread Nicola Musatti
On Feb 22, 12:09 pm, Paul Rubin wrote: > Nicola Musatti <[EMAIL PROTECTED]> writes: > > The real point about garbage collection is that it's about the only > > way to ensure that an object of one type is never taken to be of > > another type, e.g. by keeping around pointe

Re: Article of interest: Python pros/cons for the enterprise

2008-02-22 Thread Nicola Musatti
On Feb 22, 9:03 am, Bruno Desthuilliers wrote: > Nicola Musatti a écrit : [...] > > So, yes, your big company is > > likely to be safer with newbie C++ programmers than with Python newbie > > programmers. > > Sorry but I don't buy your arguments. I suspect nobody seriously does, not even in C++ n

Re: Article of interest: Python pros/cons for the enterprise

2008-02-22 Thread Paul Rubin
Nicola Musatti <[EMAIL PROTECTED]> writes: > The real point about garbage collection is that it's about the only > way to ensure that an object of one type is never taken to be of > another type, e.g. by keeping around pointers to the object that > occupied its memory before it was reallocated. I b

Re: Article of interest: Python pros/cons for the enterprise

2008-02-22 Thread Paul Rubin
Nicola Musatti <[EMAIL PROTECTED]> writes: > In C++ memory is just another resource which you can handle just like > any other one, possibly using RAII. Ok, I'll bite. Here's a straightforward Python expression: a = [f(x) + g(y) for x,y in izip(m1, m2) if h(x,y).frob() == 7] Consider how ma

Re: Article of interest: Python pros/cons for the enterprise

2008-02-22 Thread Nicola Musatti
On Feb 22, 1:17 am, Jeff Schwab <[EMAIL PROTECTED]> wrote: [...] > If you've already got a generic, language-supported way to manage > resources (like RAII with deterministic destruction), then why bother > with garbage collection? I'm not trying to knock it; it was a big step > up from C-style "w

Re: Article of interest: Python pros/cons for the enterprise

2008-02-22 Thread Nicola Musatti
On Feb 22, 12:24 am, Carl Banks <[EMAIL PROTECTED]> wrote: > On Feb 21, 1:22 pm, Nicola Musatti <[EMAIL PROTECTED]> wrote: > > > There are other downsides to garbage collection, as the fact that it > > makes it harder to implement the Resource Acquisition Is > > Initialization idiom, due to the lac

Re: Article of interest: Python pros/cons for the enterprise

2008-02-22 Thread Nicola Musatti
Paul Boddie wrote: > On 21 Feb, 19:22, Nicola Musatti <[EMAIL PROTECTED]> wrote: [...] > > The main reason why C++ has declined in usage is because it never got > > the kind of corporate marketing enjoyed by Java and C#. > > What? C++ was practically the favoured language for serious > applicatio

Re: Article of interest: Python pros/cons for the enterprise

2008-02-22 Thread Bruno Desthuilliers
Jeff Schwab a écrit : > Bruno Desthuilliers wrote: >> Carl Banks a écrit : >>> On Feb 20, 8:58 am, Tim Chase <[EMAIL PROTECTED]> wrote: > You Used Python to Write WHAT? > http://www.cio.com/article/185350 """ Furthermore, the power and expressivity that Python offers means th

Re: Article of interest: Python pros/cons for the enterprise

2008-02-22 Thread Bruno Desthuilliers
Nicola Musatti a écrit : > On Feb 21, 10:55 am, Bruno Desthuilliers [EMAIL PROTECTED]> wrote: >> Carl Banks a écrit : > [...] >>> C++ is a compile-time, type-checked language, which means it is >>> totally safer for newbies than Python. Yep, your big company is >>> totally safe with newbie C++ pr

Re: Article of interest: Python pros/cons for the enterprise

2008-02-21 Thread Carl Banks
On Feb 22, 12:23 am, Jeff Schwab <[EMAIL PROTECTED]> wrote: > Carl Banks wrote: > > On Feb 21, 7:17 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote: > >> Carl Banks wrote: > >>> On Feb 21, 1:22 pm, Nicola Musatti <[EMAIL PROTECTED]> wrote: > There are other downsides to garbage collection, as the fa

Re: Article of interest: Python pros/cons for the enterprise

2008-02-21 Thread Paul Rubin
George Sakkis <[EMAIL PROTECTED]> writes: > Could Boo or Cobra fit the bill ? If not, what's missing at a > technical level (i.e. ignoring current maturity, community size, > marketing, etc.) ? I just spent a minute looking at these and both are interesting, though Cobra looks .NET specific and I'

Re: Article of interest: Python pros/cons for the enterprise

2008-02-21 Thread Paul Rubin
Jeff Schwab <[EMAIL PROTECTED]> writes: > The most traditional, easiest way to open a file in C++ is to use an > fstream object, so the file is guaranteed to be closed when the > fstream goes out of scope. Python has this too, except it's using a special type of scope created by the "with" state

Re: Article of interest: Python pros/cons for the enterprise

2008-02-21 Thread George Sakkis
Paul Rubin wrote: > It just seems to me that there is a killer language just around the > corner, with Python's ease-of-use but with a serious compile-time type > system, maybe some kind of cross between ML and Python. Could Boo or Cobra fit the bill ? If not, what's missing at a technical level

Re: Article of interest: Python pros/cons for the enterprise

2008-02-21 Thread Jeff Schwab
Carl Banks wrote: > On Feb 21, 7:17 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote: >> Carl Banks wrote: >>> On Feb 21, 1:22 pm, Nicola Musatti <[EMAIL PROTECTED]> wrote: There are other downsides to garbage collection, as the fact that it makes it harder to implement the Resource Acquisition

Re: Article of interest: Python pros/cons for the enterprise

2008-02-21 Thread Paul Rubin
Carl Banks <[EMAIL PROTECTED]> writes: > FWIW, when I posted my comment about C++, I was mocking the article > writer's notion that it was static typing and compile-time checking > that made Java and C# "safer" for newbies, by presenting an example > that clearly defied that. I was taking it for g

Re: Article of interest: Python pros/cons for the enterprise

2008-02-21 Thread Carl Banks
On Feb 21, 11:17 am, "Reedick, Andrew" <[EMAIL PROTECTED]> wrote: > So I wouldn't be > quick to dismiss the notion that Java/C#/C++ are more newbie-safe than > Python. =/ FWIW, when I posted my comment about C++, I was mocking the article writer's notion that it was static typing and compile-tim

Re: Article of interest: Python pros/cons for the enterprise

2008-02-21 Thread Carl Banks
On Feb 21, 7:17 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote: > Carl Banks wrote: > > On Feb 21, 1:22 pm, Nicola Musatti <[EMAIL PROTECTED]> wrote: > >> There are other downsides to garbage collection, as the fact that it > >> makes it harder to implement the Resource Acquisition Is > >> Initializatio

  1   2   >