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
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
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
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)
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
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
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
[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"
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 (
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
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.
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
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
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
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
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 }
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
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
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
"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
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
In article <[EMAIL PROTECTED]>,
Alex Martelli <[EMAIL PROTECTED]> wrote:
.
[much valuable and
correct detail that
somehow managed to
avoid mentioning
Forth or Smalltalk]
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
[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
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
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
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
<[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
28 matches
Mail list logo