Re: merits of Lisp vs Python

2006-12-09 Thread Stefan Nobis
Paul Rubin  writes:

> Python is more readable than Lisp because it stays readable even if
> you don't use it on a daily basis.

Girls, this is really bullshit!

None programming language is readable. I teach programming to complete
beginners and I tried some languages -- maybe some are a little bit
worse for the uneducated, but all languages are really unreadable.

Intuitive interfaces (GUI, languages,...) are an urban legend, pure
illusion. You have to do hard work and practice to understand them.

-- 
Stefan.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: merits of Lisp vs Python

2006-12-09 Thread Stefan Nobis
Steven D'Aprano <[EMAIL PROTECTED]> writes:

[Extensibility of syntax (via Lisp like macros)]
> In the real world, programmers aren't lone wolves stalking the
> programming landscape doing their own thing. Whether we're talking
> open source projects maintained by volunteers, or commercial
> software teams, standardized languages are a good thing. It is a
> good thing that not every hare-brained idea that some random
> programmer comes up with can be implemented as part of the core
> language.

Everything from functions over classes and class hierachies to macros
are just ways to create your own personal language, to create
abstractions.

That's the whole point of high level languages: Say it your
way. Create your (domain specific) vocabulary.

(By the way: You must really hate Guido for allowing operator
overloading in Python. It's exactly the same argument, nearly the same
wording you used, that others used against operator overloading. You
have to really love Java. :))

> It is a good thing that when Fred decides to stop contributing to an
> open source project (or leave the company), other people can read
> his code without having to learn his Uber-Special Custom Macro
> Extended Language.

You don't need macros for this kind of problem -- it's a really old
problem, independend of language. There are assembler, C, Fortran,
Java, Haskell, Lisp and many more hackers who write code, that's
really hard to understand for other people.

Heck, even in natural language there are many people who say or write
things others have really trouble to understand.

So what? Big class hierachies are always hard work to understand, even
the very best designs of mankind. There is much Python code out there,
that's really hard to understand. So Python is a bad language? No,
quite not.

So why do you think, Common Lisp or Macros are a bad thing? What's the
difference (from the perspective of understanding) between a function
foo and a macro bar? Both just transform their inputs. It's just
another form of abstraction and from time to time really quite
helpful.

-- 
Stefan.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: A critic of Guido's blog on Python's lambda

2006-05-09 Thread Stefan Nobis
[EMAIL PROTECTED] (Alex Martelli) writes:

> if anonymous functions are available, they're used in even more
> cases where naming would help

Yes, you're right. But don't stop here. What about expressions? Many
people write very complex expression, that are hard to understand. A
good language should forbid these abuse and don't allow expressions
with more than 2 or maybe 3 operators!

Forbid everything that might be abused and you have a perfect
language?

I like Python and I teach Python, I'm also used to Java and C#. But
one of the best solutions to problems of beginners and not so
brilliant programmers is something like the Dr. Scheme enviroment:
Choose your language level yourself. Everyting (allowed constructs,
error messages,...) will be adjusted to your choosen level. And
experts have all at their fingertips they want and need. Code isn't
blowed up and screwed with workaround for language limitations (that
are aimed at beginners and less capable programmers).

Why only adjust to the less capable people? Give everyone what they
need and want! :)

-- 
Stefan.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Best Web dev language

2005-06-11 Thread Stefan Nobis
"Jon Slaughter" <[EMAIL PROTECTED]> writes:

> Does anyone know of any detailed and objective comparisons
> between the major languages(perl, php, java, javascript, etc...)
> that might help me get a clearer picture?

I don't know of any (really good) comparisions, but anyway here
are my opinion:

Don't look only at something someone calls "major language". The
not-so-well-known one may offer you quite some nice extras.

If you have to deal with medium to complex application give
continuation based approches (Seaside (Smalltalk), PLT/Scheme,
Cocoon (Java), UncommonWeb (Common Lisp) and others; to get an
idea look at http://lisp.tech.coop/Web/Continuation ).

What language do i seem interesting to look at for web
development? Hmmm... let's see (listing in random order):

- Common Lisp (my personal favorite)
- Scheme (PLT/Scheme, Bigloo,...)
- Scala (http://scala.epfl.ch/)
- Nice (http://nice.sourceforge.net/)
- Squeak (http://www.squeak.org/index.html)
- Python

Scala and Nice compiles to Java-Bytecode and you have access to
the complete Java-World (AFAIK there are such JVM-Compilers for
Common Lisp and some Scheme, too and there is JPython).

I don't like Perl syntax much, so it's not on the list, and PHP is
a rather chaotic language with (personal view!) at least a couple
of new security issues eacht month, so it's the worst choice one
can make (i think).

Hope that helps a little bit.

-- 
Stefan.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Newbie : checking semantics

2005-05-17 Thread Stefan Nobis
[EMAIL PROTECTED] (Bengt Richter) writes:

[block end statements]
> Training wheels do no belong as a permanent part of a bicycle,

Yes, but they would be useful for example in web programming
(embedding Python into HTML), too. So they are not only training
wheels.

But that's not so important. What Python got really wrong is
mixing binding and assignment (because this way you have little
chance to catch typos in identifiers).

-- 
Stefan.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Newbie : checking semantics

2005-05-16 Thread Stefan Nobis
Andrew Dalke <[EMAIL PROTECTED]> writes:

> See the program "pindent.py"

Thanks for the hint, i didn't know about it.

-- 
Stefan.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Newbie : checking semantics

2005-05-16 Thread Stefan Nobis
rbt <[EMAIL PROTECTED]> writes:

> True beginners (no programming experience whatsoever) don't have
> to deal with unlearning stuff such as the bracket plague.

That's true. But they also not very used to give nothing (->
whitespace) a meaning. I teached quite some beginners and most of
them had problems to get the indentation right.

At least in the very beginning IMHO it would be useful to
explicitly end a block with some kind of an end statement.

Meaningful whitespache is not a big problem (as many people seems
to think) but it's also not very obvious and sometimes it causes
at least a little bit trouble.

-- 
Stefan.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Newbie : checking semantics

2005-05-16 Thread Stefan Nobis
Andrew Dalke <[EMAIL PROTECTED]> writes:

> When you say "beginners" is that people with no previous
> programming experience

>From time to time I teach some programming (in an institution
called "Volkshochschule" here in Germany -- inexpensive courses
for adults). My Python course is for absolute beginners with no
previous programming experience of any kind.

And yes, this people have quite some difficulties to get their
blocks indented right. Before Python I used C++ in this beginner
course and at least setting the boundaries for blocks was a little
less of a problem.

So I would appreciate optional statements to end a block
(indentation rules may be mandatory). This comes also very handy
in something like Python Server Pages of mod_python (where a
comment line to explicitly end a block is sometimes needed).

-- 
Stefan.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Newbie : checking semantics

2005-05-16 Thread Stefan Nobis
"LDD" <[EMAIL PROTECTED]> writes:

> The fact that python doesn't check if the symbol
> AFunctionThatIsntDefined is defined, is really bad when you
> develop big pieces of code.

Yes, that's one of my two points, that i think are misfeatures in
Python, too. The problem is, that Python don't distinguish between
defining/binding a variable and setting a value (for example in
contrast to Lisp, where binding and setting are two separate
operations (namley let and setq)).

The other point is a missing (optional) statement to end blocks
(so you optional don't have to mark block via whitespace). IMHO
this comes very handy in some cases (like mixing Python and HTML
like in PSP). From my experience i also would say beginners have
quite some problems with only whitespace marking blocks (but it
also has some benefits). So i'm not as sure about this as the
above point.

BTW: I would also appreciate a nicer syntax for classes (no
explicit self, no masses of _). But that's another story... :)

-- 
Stefan.
-- 
http://mail.python.org/mailman/listinfo/python-list