Hacker News new | ask | show | jobs
by lowboy 4765 days ago
I think it's the hubris that's putting people off:

> Brython is designed to replace Javascript as the scripting language for the Web

4 comments

If I wrote a Python implementation in JavaScript, I'd probably have some hubris about it as well.

I'm not sure if the developer is one person or if they wrote the landing page as well, but let's assume it is that same person.

If someone has focused enough energy to implement a language in JavaScript, it is probably fair say that marketing isn't his or her primary skill.

At the same time, reading over the text again, people have said crazier things and done much less. If the developer's goal is to replace JavaScript with Python and his or her first attempt is to implement Python in JavaScript, I, for one, applaud their effort.

That's a silly complaint. Doesn't every language designer feel that their product is better than the thing it desires to replace?
A better question: Is python really any better than JavaScript? Sure, it has advantages here and there. But there are things I like about JavaScript that are better than python. For example, having anonymous functions that are more than a single expression inside a lambda.

Yes, I know you can declare a function inside another and you get a closure. But, JavaScript's syntax is just nicer.

Wow. I had never seen that. There are literally tears streaming down my face I was laughing so hard.
I enjoyed it more this time than I did when I last saw it, perhaps because I was more familiar with the showcased peculiarities last time (the theme is garbage in, garbage out).
In all my Python years, I have never needed to write a long anonymous function. I consider it a bit of a code smell.

This isn't to say it's wrong to do in JS, just that the patterns in Python are different so you don't use this in practice.

I have never needed to write a long anonymous function.

So two line of code is long now?

Yes, as opposed to "short", i.e. a lambda. I'm sorry if my terminology offends you.
JavaScript's syntax being 'nicer' seems pretty subjective.
"It will" would register as hubris, but "designed to" seems harmless to me.
In programmers, hubris is - along with laziness and impatience - a great virtue. In Larry Wall, they gave the world Perl.