flat assembler
Message board for the users of flat assembler.
Index
> High Level Languages > On python's indentation |
Author |
|
guignol 01 Nov 2010, 11:03
f0dder
Can you brag for me a little, why you dig Python? |
|||
01 Nov 2010, 11:03 |
|
bitRAKE 02 Nov 2010, 04:56
|
|||
02 Nov 2010, 04:56 |
|
revolution 02 Nov 2010, 05:23
Okay, I'll play.
The indentation thing imposes some quite serious restrictions on the editor software settings. If you like to use tabs and someone else likes to use spaces, and both of you edit the same sources, then that would seem to create a rather large potential for fucked up indentation as seen by Python but looks perfectly normal in the editor screen. I see indentation as a stylistic thing that is a user preference. I can't see how imposing it in a language is an advantage. [edit] Actually, this indentation thing is one of the reasons I wrote fasmarm. The normal ARM assembler imposed this also. All labels had to start at column one, and all instruction/macros had to start with at least one whitespace. I disliked the restriction so much that I needed to get away from it, hence fasmarm appeared. I felt it was just laziness on the part of the assembler writers. There was no need for it really. Last edited by revolution on 02 Nov 2010, 06:47; edited 1 time in total |
|||
02 Nov 2010, 05:23 |
|
bitRAKE 02 Nov 2010, 06:15
Python editors allow seeing normally non-displayed characters, and even FASMW has a feature to converting those characters -- problem solved. There is some stylistic restriction imposed, but it is minimal as the programmer only need use a consistent indentation and not a specific indentation.
I don't program in Python. |
|||
02 Nov 2010, 06:15 |
|
revolution 02 Nov 2010, 06:18
Hehe, the problem is not solved if one has to use special/specific editors just to write Python stuff. I like my current editor and am very used to it. My coding performance would drop drastically if I had to switch editors and comply with stylistic restrictions.
|
|||
02 Nov 2010, 06:18 |
|
bitRAKE 02 Nov 2010, 06:42
No doubt, there is a use case for your current tools which would not imped your productivity. Any adjustment in your coding style would be greatly offset by the added performance Python would impart. Python will leverage your existing skill-set.
|
|||
02 Nov 2010, 06:42 |
|
revolution 02 Nov 2010, 06:52
Like the programming language Whitespace, if you get the spacing wrong you also get the program wrong. Invisible things should not affect the outcome. No chance to detect errors of omission, too many implicit things happening, too much to get distracted by when typing ("Oh, is it 3 spaces or 4?").
Last edited by revolution on 02 Nov 2010, 10:29; edited 1 time in total |
|||
02 Nov 2010, 06:52 |
|
bitRAKE 02 Nov 2010, 07:26
This initial confusion is common. The chance of error is completely eliminated through proper editor configuration, or the use of an intermediate translator in rare cases. The syntactic structure is exactly the opposite of implicit - the explicit form eases comprehension. With continued use of Python you'll see how it fits your needs perfectly.
|
|||
02 Nov 2010, 07:26 |
|
f0dder 02 Nov 2010, 09:19
In the real world, tabs and spaces get mixed up - the Pythonistas response is "delete that editor!" or "fix the configuration", but that's not always possible if you live in the real world and have to work with other people.
Then there's the issue of formatting-mangling transfer mediums... some forum software, email clients, et cetera. Yes, consistent indentation is a Very Good Thing, but I find that using it as a language device creates more confusion & bug opportunities than it fixes stuff. Using block delimiters (whether being/end or curly braces or WHATEVER) means you intent is 100% clear, and if the source got mangled along the way it can be reformatted without possibility of error. Heck, it means you can reformat code to your preferences, automatically. |
|||
02 Nov 2010, 09:19 |
|
guignol 07 Nov 2010, 08:06
Yeah! Choke the Python!
|
|||
07 Nov 2010, 08:06 |
|
guignol 07 Nov 2010, 08:19
bitRAKE
Leave your "pooper editor confiuration" to your elf(ves). (Some, simply can't get over snake game) |
|||
07 Nov 2010, 08:19 |
|
TmX 07 Nov 2010, 12:26
If I'm not mistaken, the whitespace-sensitive is inherited from Haskell, one of the language Python influenced from.
|
|||
07 Nov 2010, 12:26 |
|
bitRAKE 08 Nov 2010, 16:14
Return of the snake...
http://nickgravgaard.com/elastictabstops/ ...just another view point on related topic. |
|||
08 Nov 2010, 16:14 |
|
masonswanson 30 Jan 2011, 18:23
bitRAKE wrote: Return of the snake... that site tried to run something on my systemdrive's root |
|||
30 Jan 2011, 18:23 |
|
Tyler 30 Jan 2011, 19:38
Could it have been your browser trying to run Java? There's a Java app on the page.
|
|||
30 Jan 2011, 19:38 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.