Python is not [yet] Considered Harmful

M

mike420

map(lambda f: f(1), [lambda x: x + 1 for i in range(3)])

Oh, OK, it was a typo (1 instead of i). I take it all back (for now).

It was an honest mistake, not a troll! Still, I think it should
be [1, 2, 3] instead of [3, 3, 3]
 
K

KefX

You can't just pull up one example and call a language "harmful" from it, no
matter how maddeningly unintuitive it is. If you could, ALL languages would be
harmful (both computer and natural languages!).

- Kef
 
D

Darius

On Sun, 26 Oct 2003 22:56:19 -0800 (PST)
map(lambda f: f(1), [lambda x: x + 1 for i in range(3)])

Oh, OK, it was a typo (1 instead of i). I take it all back (for now).

It was an honest mistake, not a troll! Still, I think it should
be [1, 2, 3] instead of [3, 3, 3]

A honest mistake would be a post to c.l.python saying,
"map(lambda f: f(1), [lambda x: x + 1 for i in range(3)]) returns
[2,2,2] rather than [1,2,3] like I'd expect, what's going on here?"

I really don't know which community you are trying to injure more:
Haskell or Python.

At any rate, either you are a troll and none of the involved want you
here, or you aren't and you should cease posting for a few months
so you stop looking like one.
 
P

Peter Hansen

Darius said:
[snip trollisms]
At any rate, either you are a troll and none of the involved want you
here, or you aren't and you should cease posting for a few months
so you stop looking like one.

He is a troll, no question. Check his recent postings for confirmation.

-Peter
 
H

Hannu Kankaanp??

It was an honest mistake, not a troll! Still, I think it should
be [1, 2, 3] instead of [3, 3, 3]

I don't think you understand what a troll is. Troll is someone
who posts any of the following:

1. "Python is Considered Harmful" (given it's highly readable syntax,
great libraries and high dynamicity, I can't see how a single
feature could make Python 'harmful'. The title could've just been
"Unexpected behaviour of closures inside list comprehensions")

2. "I present to you the final and ultimate proof of Python's
brain-damage" (again, a needless attack.. which turned against
yourself though)

3. "All this Python bashing is starting to feel like mocking
a retarded child..." (this doesn't need explanation, I hope)

And look, you posted all three of them in a single message!
Well, your typo gave us a good laugh nevertheless ;)

If you want [1, 2, 3], try:

map(lambda f: f(1), [lambda x, i=i: x + i for i in range(3)])

i=i will make a local variable i within the lambda so that
each lambda will refer to their own i instead of sharing the
same i from the outer scope.
 
T

Thomas Stegen CES2000

map(lambda f: f(1), [lambda x: x + 1 for i in range(3)])

Oh, OK, it was a typo (1 instead of i). I take it all back (for now).

It was an honest mistake, not a troll!

Haha, and why is this posted to newsgroups dedicated
to languages completely unrelated to python?

You're a troll and I am feeding you. Your stupidity is however
large enough so it does not need to be pointed out really. I
won't be doing it again.

Ta-ta.
 
J

Josef Meile

I have done stupid things, after all I'm a human being. But I have
never done anything like this before. I mean saying that I have the
proof that a language doesn't work because of a piece of code isn't
giving me the results I'm expecting. The first thing I would think is
that it was my mistake and try to find it by myself. But if I don't see
any error, then I would formulate a polite question instead of insulting
the python developers, who for sure have done a hard work giving
us such nice language. I'm sure you'd have received a better answer.
But now, a lot of people is upset at you because of your arrogance.

So, you had better change your attitude and read something about
Netiquette.

By the way, since the subject is python related, I don't see the need
to do a crossposting. It just seems like if you wanted to catch the
attention of as many people as you can.
 
A

anandpillai

I think it is you who are brain-damaged, not python.



Every computer language has its pros and cons, it does

not befit a good programmer to post flame baits on

any comp.lang.x newsgroup just because a piece of code

he wrote worked in a way he did not expect using the

language 'x'.



If the idea is to promote haskell, this is certainly not the

way I would go about it.



Try googling for the word 'netiquette', just might save you.



-Anand
 
V

Ville Vainio

Josef Meile said:
By the way, since the subject is python related, I don't see the need
to do a crossposting. It just seems like if you wanted to catch the
attention of as many people as you can.

It's a standard crossposting troll practice - he wants the Pythonistas
to say something negative about Haskell, to make the Haskellistas
flame us back, ad infinitum.

I guess it can be a fun sociological experiment, if you are posting
pseudonymously.
 
S

SB

This post is interesting, and raise an issue (unfortunately already
known) about scopes in Python. But bad faiths occurs when the poster
forget that :

1) variable capture is not an error, it can be linked with some topics
of computer science in one hand, and well known and considered useful
programming construction in the other hand (say, genuine exceptions).
Old timer's LISP used dynamic contexts, and has not been reported as
causing brain damage (AFAIK).

2) Now, a little bad faith from my own... Could you imagine the number
of people suffering this kind of brain damage (caused by the heavy use
of monads), which goes around explaining to people that imperative
programming is useless, and that only them knows the truth ??? You
seem to be part of them...

SB.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,830
Latest member
ZADIva7383

Latest Threads

Top