Hacker News new | ask | show | jobs
by jzwinck 4765 days ago
A demo of a new way to use a programming language shouldn't be full of these "Oh, that crap is just for the demo, it would look better in practice." It's a programming language demo, show us something that makes us want to use it.
1 comments

I agree completely: sample/demo code should be the best you can make it. And I'm sure the Brython authors would welcome a pull request that improves their demo code.

But the comment I replied to was a bit misleading (no doubt unintentionally): it made two quite valid complaints about coding practices, without mentioning that these are only in the demo code.

When I read that comment I thought, "WTF? Brython injects a magic 'ctx' global into your Python code?" It doesn't, so I thought it was worth pointing out that these are just sample code issues that wouldn't affect any code you write in Brython.