How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2QdxY4RzWzUUiLuE at potatochowder.com 2QdxY4RzWzUUiLuE at potatochowder.com
Fri Aug 7 16:18:19 EDT 2020


On 2020-08-07 at 21:54:35 +0200,
Marco Sulla <Marco.Sulla.Python at gmail.com> wrote:

> On Fri, 7 Aug 2020 at 19:48, Richard Damon <Richard at damon-family.org> wrote:

> Christian Seberino just expressed a doubt about how a clear separation
> between a statement and an expression is quite desiderable in the
> "real" programming world. And I tried to explain it with the
> assignment operation, since a ton of programmers feel very frustrated
> about reading code of other programmers with assignment in an if
> statement. I'm quite sure that they thought, as I thought: "What do
> this?"
> Worse when their program failed and they discovered that they wrote
> `if (a=b)` instead of `if (a==b)`.

Don't conflate the concept with the syntax.  The fact that Python now
has "the walrus operator" says that assignment expressions are useful.
The issue with the C version is that the assignment and comparison
operators look too much alike and using the wrong one can cause *silent*
catastrophes (although modern C compilers can and do emit appropriate
warnings or errors, if you ask them nicely).

> I'm just more curious about why Lisp programmers think that it's
> better to not make a hard distinction between statements and
> expressions.

Simplicity of syntax.  Very few languages have a simpler syntax than
Lisp (Ook, et al, notwithstanding).


More information about the Python-list mailing list