View Single Post
Old 24 August 2015, 21:30   #303
Shameless recidivist
commodorejohn's Avatar
Join Date: Jun 2012
Location: Duluth, Minnesota (USA)
Age: 32
Posts: 172
Originally Posted by idrougge View Post
I had my doubts about trying to teach a beginner programmer the art of Python indentation, but I think I've come to the conclusion that it makes sense. C programmers tend to indent their blocks as well, even though they have their braces, so why do both when one will do?
Because literal whitespace is an abomination that belongs in the Pit of Eldritch Horrors along with JCL and RPG. Getting an error because you didn't include the correct amount of something is irritating enough; getting an error because you didn't include the correct amount of nothing is absolutely ridiculous.

Originally Posted by Mrs Beanbag View Post
If computers had been invented by the Arabs, we'd all be using something like Lisp.
This is an interesting assertion. What makes you say that?

It really isn't... my gripe with BASIC is not its absence of features, but the lack of generality and structure in the syntax. The "new features" i've suggested are only the logical extension of existing features that are currently only allowed in a single context. "0 to 10 step 2" is a phrase that already appears in BASIC programs. What i'm suggesting is to interpret it as an object in itself, that can be used generically.
Smalltalk does exactly this; its for-loop equivalent is just a generic iteration message sent to an Interval object:
1 to: 10 do: [ :x | Transcript print: x ]
commodorejohn is offline  
Page generated in 0.04037 seconds with 10 queries