Why not allow empty code blocks?

Rustom Mody rustompmody at gmail.com
Sat Jul 30 23:34:18 EDT 2016


On Sunday, July 31, 2016 at 8:44:13 AM UTC+5:30, Steven D'Aprano wrote:

> It has always perplexed me that Lisp's prefix notation is held up as
> the /sine qua non/ of elegance and power, while Forth is ignored if not
> ridiculed. Forth is just as expressive as Lisp, just as meta, just as
> customizable. You can create your own syntax in Forth. Forth doesn't have
> macros, because it doesn't need them: you have complete control of what is
> compiled and what is interpreted and when.
> 
> I maintain that Forth would be a better meta-language than Lisp. If you're
> going to require students to learn to think using a grammar which isn't OVS
> or SVO (i.e. infix) then it seems to me that postfix with a stack is easier
> to learn than prefix with parentheses.

That may well be
In principle just flip (f x y) to x y f and we get from Lisp to Forth (or postscript)
In practice people have taken the pains to work out much of the theory of CS 
in Lisp. Has it been done in Forth??  Maybe… Dunno…

> On Sun, 31 Jul 2016 04:16 am, Michael Torrie wrote:

> > I'll never use Scheme again in my life, but I'm very 
> > glad to have learned it in my Theory of Programming Languages course at
> > uni.  Python would have been alright to teach "programming," but to
> > teach the actual theory of programming languages (lambda calculus, lists
> > as a foundation unit for all other data structures), Scheme was an ideal
> > choice for teaching these fundamentals.
> 
> People misuse language. You say that scheme was "ideal". That literally
> means that there is *not one single thing* about Scheme that isn't PERFECT
> for the task, that it reaches a faultless standard of perfection lacking
> all weaknesses. 

As usual you are making up definitions and being ridiculous.
In most common usage ‘ideal’ is used as opposed to ‘real’

> That's much stronger than saying "Scheme is the best
> language for...", and much stronger than saying "nothing will ever be
> better". It's saying that nothing *could* be better, because perfection has
> been reached.
> 
> (Yes yes, I know you don't actually mean that, not literally. I'm making a
> rhetorical point.)

Good to know. But its not clear what the point is.
Michael said Lisp is ideal FOR TEACHING <some list of topics>

> 
> 
> > The continued confusion that 
> > pops up on the list from new users on how Python variables work wouldn't
> > be an issue if they came from a Scheme background.  The idea of names
> > and binding of names would make perfect sense to them.
> 
> Of course. But that's because they would have suffered the same confusion
> when learning Scheme, and got past it by their second language, Python.

That’s because variables are first class in lisp and neither-fish-nor-foul class
in python



More information about the Python-list mailing list