Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Note that Python is sensitive to indentation not whitespace per se. So long as your line is at the right level there's no difference between

    a=1+2
and

    a = 1      + 2
In fact I wish Python were more sensitive to whitespace, then I could say my-variable without it mistaking a hyphen for a minus.


"then I could say my-variable without it mistaking a hyphen for a minus"

That's something cool. It would involve a new PEP and aggressive enforcement of PEP 8


Reckon it'd break too much existing code, but hyphens are so much nicer than underscores or interCapping. Using a language that supports that, my hands are noticeably more comfortable without needing to reach for the shift key all the time.


you could just use a font that renders underscores differently (like, say, slightly stylized hyphens.) That's the correct approach, semantically--when you use an underscore, you're basically trying to say "a space, but without the syntactic meaning of one."


It's not about how it appears on screen but about the keystrokes needed to enter it. If I could I'd find a way to use only square brackets too. Ideally I'd use only ; or : and only ' or " too, and adjust my keymap accordingly.


This is one of the advantages of Lisp. It is common for Lisp programmers to map the [] keys to () and vice-versa. Since Lisp requires so few of the keys, such mappings can prevent you from needing to press the less comfortable keys.


It is not hard to remap your key bindings if you find `_` too hard to type.


Lisp? ;-)


Forth?


I really like Forth, it seems to me to be very much the right way to do things, however I've never managed to write an actually useful program in it.

Mostly I use Tcl as a sort of Lisp/Forth mashup :-)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: