Alternative to Tab character in MapScript/NB
A
Adam Bouhenguel
Thanks for calling this out. I reduced the parser to just expect tabs to keep things simple, but I didn’t realize that it was difficult to insert a tab on iPad.
Part of the tension between spaces and tab is because MapScript uses whitespace instead of opening and closing characters like { and }. These are also probably difficult to type on iPad.
Do you have any thoughts on this tradeoff?
P
Peter A. Laudenslager
Adam Bouhenguel: { is only an option key away, so not too bad, but not available with a single touch on the default alpha keyboard. To get a Tab character, I either have to cut and paste from somewhere else, or use voice recognition and say “tab key”. Very disruptive to flow.
I am ok with using indents to nest commands (I am a Python guy, so familiar), and very happy to not need to type and match up braces. Tabs work well on the desktop (although you still have to discover that tabs are required - visually looks like 2 spaces).
Rather than using braces for nesting, I would vote for 4-spaces as a substitute for the tab key.
A
Adam Bouhenguel
Peter A. Laudenslager: Any reason you’re advocating for 4-spaces over 2? Seems like a lot to type :)
P
Peter A. Laudenslager
Adam Bouhenguel: no - 2 is fine, and visually matches the 2 space tab in the editor. I just assumed 2 spaces ran the risk of conflict with something else, and 4 would be less likely to conflict or be accidental. Programmer’s choice.
;-)
A
Adam Bouhenguel
Peter A. Laudenslager: Gotcha. I’ve got my hands full at the moment with some of the advanced math stuff. Will circle back to this.