Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Python
Python syntax in Lisp and Scheme
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Alexander Schmolck, post: 1729850"] Well, I supposed this thread has spiralled out of control already anyway:) I really don't understand why this is a problem, since its trivial to transform python's 'globally context' dependent indentation block structure markup into into C/Pascal-style delimiter pair block structure markup. Significantly, AFAICT you can easily do this unambiguously and *locally*, for example your editor can trivially perform this operation on cutting a piece of python code and its inverse on pasting (so that you only cut-and-paste the 'local' indentation). Prima facie I don't see how you loose any fine control. Sorry, I don't understand this sentence, but maybe you mean that the potential inconsitency between human and machine interpretation is a *feature* for Lisp, C, Pascal etc!? If so I'm really puzzled. I don't understand why this is any different to e.g. ')))))' in Lisp. The closing ')' for DEFUN just looks the same as that for IF. I don't understand what you mean. Could you maybe give a concrete example of the information that can't be displayed? AFAICT you can have 'sexp'-movement, markup and highlighting commands all the same with whitespace delimited block structure. I'm pretty near certain it is better: In Pascal, C etc. by and large block structure delimitation is regulated in such a way that what has positive information content for the human reader/programmer (indentation) has zero to negative information content for the compiler and vice versa. This is a remarkably bad design (and apart from cognitive overhead obviously also causes errors). Python removes this significant problem, at as far as I'm aware no real cost and plenty of additional gain (less visual clutter, no waste of delimiter characters ('{','}') or introduction of keywords that will be sorely missed as user-definable names ('begin', 'end')). In Lisp the situtation isn't quite as bad, because although most of the parens are of course mere noise to a human reader, not all of them are and because of lisp's simple but malleable syntactic structure a straighforward replacement of parens with indendation would obviously result in unreadable code (fragmented over countless lines and mostly in past the 80th column :). So unlike C and Pascal where a fix would be relatively easy, you would need some more complicated scheme in the case of Lisp and I'm not at all sure it would be worth the hassle (especiallly given that efforts in other areas would likely yield much higher gains). Still, I'm sure you're familiar with the following quote (with which I most heartily agree): "[P]rograms must be written for people to read, and only incidentally for machines to execute." People can't "read" '))))))))'. Possibly, but certainly not due to the use of significant whitespace. 'as [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Python
Python syntax in Lisp and Scheme
Top