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

A better syntax for loops with geometric progressions like this would be obtained by modifying the syntax for writing arithmetic progressions (e.g. "a:b:c") by using a different separator symbol.

For example, if the separator for geometric progressions would be ":>", your loop example would become "for bit in 1:>128:>2". Another example of (non-ASCII) separator would be "for bit in 1⋮128⋮2"



Such syntax benefits from a comprehensive target language to compile into, in terms of which it can be understood, if necessary.




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

Search: