Live data from Hacker News

Show HN: Making Python one-liner-fit with the new pwk (Python With Kurly braces)

github.com

31–40 of 78 posts

Re: Show HN: Making Python one-liner-fit with the new pwk (Python With Kurly braces)

#32
post #29

Earlier quoted context omitted.

"pwk" is both code and "executable" -- you can open it with any text editor. I didn't want to name it "pwk.py" to save on typing on the command line. --m

Wow, I feel _really_ dumb now - I just saw the filename without ".py" and assumed it was an executable Sorry, I take it back!

It's sort of just pedantry because I know what you mean, but FYI it is an executable when you mark it (chmod +x) as such; what you mean to say is that you assumed it was a binary, the output of a compiler, with the input (source) not provided.

Re: Show HN: Making Python one-liner-fit with the new pwk (Python With Kurly braces)

#33
post #4
post #2

> Python With Kurly braces I wasn't aware of this. I guess it might silence a few critics. However I'd be much more interested to try "Javascript with semantic white space"

We tried that for a while, yeah? https://coffeescript.org/

And I loved it. So much more convenient than standard JavaScript.

Re: Show HN: Making Python one-liner-fit with the new pwk (Python With Kurly braces)

#35

Can someone help me understand the rationale behind semantic whitespace as a replacement for explicit delimiters? Is it purely aesthetic?

It forces consistent formatting within a file. But I think it was more relevant years ago. These days I see a lot of people using code formatters.

That’s a pretty bizarre rationale given that other languages didn’t need semantic whitespace (or a formatter) to maintain consistency, and the consistency was even achievable for larger code units than individual files. Formatters are definitely the way to go, but baking it into the syntax was never necessary or even helpful IMO.

Re: Show HN: Making Python one-liner-fit with the new pwk (Python With Kurly braces)

#39
I like python and I enjoy weirdo one-off languages, so I'm predisposed to like this. But why keep the colons? It would look nicer without.

...

I just attempted to type out an example and found a reason not to do this... it's the same reason c needs parentheses around the conditional. On the balance, I prefer parentheses over the vestigial colon.

Post reply on HN