Re: Python or Java or maybe PHP?

2006-01-11 Thread Steve Holden
Peter Hansen wrote: > Alex Martelli wrote: > >>One great programming principle is "Dont' Repeat Yourself": when you're >>having to express the same thing over and over, there IS something >>wrong. I believe the "DYR" phrasing is due to the so-called Pragmatic >>Programmers, who are paladins of Ru

Re: Python or Java or maybe PHP?

2006-01-06 Thread Mike Meyer
Xavier Morel <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: >> That doesn't sounds like "hates" to me. More like "doesn't like the >> baggage." >> Yet anonymous functions are nice. > > Wouldn't it be possible to change the `def` statement to return a > reference to the function, and allow

Re: Python or Java or maybe PHP?

2006-01-06 Thread Xavier Morel
Alex Martelli wrote: > Xavier Morel <[EMAIL PROTECTED]> wrote: >... >> Wouldn't it be possible to change the `def` statement to return a >> reference to the function, and allow omitting the function name thereby >> bypassing the default binding (current behavior)? > > It's _possible_ (doesn't

Re: Python or Java or maybe PHP?

2006-01-06 Thread Alex Martelli
Xavier Morel <[EMAIL PROTECTED]> wrote: ... > Wouldn't it be possible to change the `def` statement to return a > reference to the function, and allow omitting the function name thereby > bypassing the default binding (current behavior)? It's _possible_ (doesn't introduce syntax ambiguities)

Re: Python or Java or maybe PHP?

2006-01-06 Thread Xavier Morel
Mike Meyer wrote: > That doesn't sounds like "hates" to me. More like "doesn't like the > baggage." > > >> # Current behavior >>> def foo(*args, **kwargs): pass >>> print foo >>> # Extended behavior >>> # returns a reference to the function >>> def foo(*args, **kwarg

Re: Python or Java or maybe PHP?

2006-01-03 Thread Dan Sommers
On Tue, 03 Jan 2006 16:25:06 -0500, Mike Meyer <[EMAIL PROTECTED]> wrote: > I vaguelly recall hearing that Guido thought about adding macros to > Python, and rejected the idea because he didn't want users to have to > deal with compile-time errors at run time. Or something to that > effect. That

Macros in Python? (was Re: Python or Java or maybe PHP?)

2006-01-03 Thread Aahz
In article <[EMAIL PROTECTED]>, Mike Meyer <[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] (Aahz) writes: >> In article <[EMAIL PROTECTED]>, >> James <[EMAIL PROTECTED]> wrote: >>> >>>I keep asking myself why isn't this more popular especially when many >>>prominent Python devs seem to be well aware

Re: Python or Java or maybe PHP?

2006-01-03 Thread Mike Meyer
[EMAIL PROTECTED] (Aahz) writes: > In article <[EMAIL PROTECTED]>, > James <[EMAIL PROTECTED]> wrote: >>I keep asking myself why isn't this more popular especially when many >>prominent Python devs seem to be well aware of Lisp where macros are >>done right. > You have confused "many Python devs"

Re: Python or Java or maybe PHP?

2006-01-03 Thread Aahz
In article <[EMAIL PROTECTED]>, James <[EMAIL PROTECTED]> wrote: > >Do you have any specific comments towards Logix's implementation? Nope. I do know that Guido is generally in favor of Python-like languages, and one of the goals of the AST project was to make that easier. Ditto PyPy. -- Aahz (

Re: Python or Java or maybe PHP?

2006-01-03 Thread James
Guido's concerns about preserving simplicity resonate well with me. Maybe I am just a kid excited with his new toy. I have always admired macros. Quite a few functional languages have them now. But they have always been in languages with sub-optimal community code base, which meant I never went too

Re: Python or Java or maybe PHP?

2006-01-03 Thread Aahz
In article <[EMAIL PROTECTED]>, James <[EMAIL PROTECTED]> wrote: > >I keep asking myself why isn't this more popular especially when many >prominent Python devs seem to be well aware of Lisp where macros are >done right. You have confused "many Python devs" with Guido. ;-) Guido hates macros.

Re: Python or Java or maybe PHP?

2006-01-03 Thread James
While on topic of custom contructs, the topic of syntactic macros has come up in the past. Does anyone know if the dev team ever considered for or against them? My interest in them was renewed when I came across Logix http://www.livelogix.net/logix/ It does not seem very active at the moment nor do

Re: Python or Java or maybe PHP?

2006-01-02 Thread Alex Martelli
Hans Nowak <[EMAIL PROTECTED]> wrote: ... > Maybe I misunderstand, but shouldn't this be: > > def WHILE(cond): > if not cond(): return > yield None > for x in WHILE(cond): yield x > > After all, the original version only yields two things: None and a > generator. > > (Or is th

Re: Python or Java or maybe PHP?

2006-01-02 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Mike Meyer <[EMAIL PROTECTED]> wrote: . [valuable remarks on scientific evidence and so on] . . >Finally, there's a camp that pushes static typin

Re: Python or Java or maybe PHP?

2006-01-02 Thread Hans Nowak
Alex Martelli wrote: > A Ruby example of reimplementing while: > > def WHILE(cond) > | return if not cond > | yield > | retry > | end > i=0; WHILE(i<3) { print i; i+=1 } > > Python's a bit less direct here, but: > > def WHILE(cond): > if not cond(): return > yield

Re: Python or Java or maybe PHP?

2006-01-02 Thread Alex Martelli
James <[EMAIL PROTECTED]> wrote: > Now I am curious. How do Python 2.5 and Ruby create new control > structures? Any code samples or links? A Ruby example of reimplementing while: def WHILE(cond) | return if not cond | yield | retry | end i=0; WHILE(i<3) { print i; i+=1 }

Re: Python or Java or maybe PHP?

2006-01-02 Thread James
Now I am curious. How do Python 2.5 and Ruby create new control structures? Any code samples or links? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python or Java or maybe PHP?

2006-01-02 Thread Mike Meyer
Steven D'Aprano <[EMAIL PROTECTED]> writes: > On Mon, 02 Jan 2006 19:35:10 -0500, Mike Meyer wrote: >> What SPARK papers I have >> found concentrate more on correctness than productivity: IIRC, they >> claim millions of lines of production code with no errors. > Writing error-free code is easy. Tha

Re: Python or Java or maybe PHP?

2006-01-02 Thread Steven D'Aprano
On Mon, 02 Jan 2006 19:35:10 -0500, Mike Meyer wrote: > What SPARK papers I have > found concentrate more on correctness than productivity: IIRC, they > claim millions of lines of production code with no errors. Writing error-free code is easy. That's just a matter of incremental improvement of e

Re: Python or Java or maybe PHP?

2006-01-02 Thread Mike Meyer
"NOKs" <[EMAIL PROTECTED]> writes: > Thanks! That's really useful. I'm not sure if I'm a "dynamically typed" > guy - coming form C#, very strict language, and C++, statically typed, > but i definetly searched and see the debate going strong. Not try to > start it here, but do you think that statica

Re: Python or Java or maybe PHP?

2006-01-02 Thread Alex Martelli
Cameron Laird <[EMAIL PROTECTED]> wrote: ... > "c = d unless ...": it's possible to distinguish Python from > Ruby in another way. Python is arguably better for group work, > or at least more standard for team projects, because it more > consistently exposes "one correct solution", while Ruby

Re: Python or Java or maybe PHP?

2006-01-02 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Alex Martelli <[EMAIL PROTECTED]> wrote: . [much valuable and correct detail that somehow managed to avoid mentioning Forth or Smalltalk]

Re: Python or Java or maybe PHP?

2006-01-02 Thread Alex Martelli
Peter Hansen <[EMAIL PROTECTED]> wrote: > Alex Martelli wrote: > > One great programming principle is "Dont' Repeat Yourself": when you're > > having to express the same thing over and over, there IS something > > wrong. I believe the "DYR" phrasing is due to the so-called Pragmatic > > Programme

Re: Python or Java or maybe PHP?

2006-01-02 Thread Ilias Lazaridis
[EMAIL PROTECTED] wrote: > Hi everyone, > > I need to write a web app, that will support millions of user accounts, > template-based user pages and files upload. The client is going to be > written in Flash. I wondered if I coudl get your opinions - what do you > think is the best language to use

Re: Python or Java or maybe PHP?

2006-01-02 Thread Peter Hansen
Alex Martelli wrote: > One great programming principle is "Dont' Repeat Yourself": when you're > having to express the same thing over and over, there IS something > wrong. I believe the "DYR" phrasing is due to the so-called Pragmatic > Programmers, who are paladins of Ruby, but I also believe it

Re: Python or Java or maybe PHP?

2006-01-01 Thread Alex Martelli
NOKs <[EMAIL PROTECTED]> wrote: > Thanks! That's really useful. I'm not sure if I'm a "dynamically typed" > guy - coming form C#, very strict language, and C++, statically typed, C#'s pretty close to Java, typing-wise, and C++'s not that far away. I did mention one GOOD statically typed language

Re: Python or Java or maybe PHP?

2006-01-01 Thread NOKs
Thanks! That's really useful. I'm not sure if I'm a "dynamically typed" guy - coming form C#, very strict language, and C++, statically typed, but i definetly searched and see the debate going strong. Not try to start it here, but do you think that statically typed - namely, if I undertood correctl

Re: Python or Java or maybe PHP?

2006-01-01 Thread Alex Martelli
<[EMAIL PROTECTED]> wrote: > Hi everyone, > > I need to write a web app, that will support millions of user accounts, > template-based user pages and files upload. The client is going to be > written in Flash. I wondered if I coudl get your opinions - what do you > think is the best language to u