A Python 3 implementation for client-side web programming
31–40 of 120 posts
Re: A Python 3 implementation for client-side web programming
#32Re: A Python 3 implementation for client-side web programming
#33JS has been in use around the web for a long time now and I don't see the need why should I go about using Python for the very same? Doesn't one language has a purpose of it's own?
If it wasn't the case, then people would have worked on creating a unified language for all our needs.
Re: A Python 3 implementation for client-side web programming
#34I can't believe all the negative comments here. Someone has implemented Python in JavaScript. I personally think that is incredible.
> Brython is designed to replace Javascript as the scripting language for the Web
Re: A Python 3 implementation for client-side web programming
#35I can't believe all the negative comments here. Someone has implemented Python in JavaScript. I personally think that is incredible.
I think it's the hubris that's putting people off: > Brython is designed to replace Javascript as the scripting language for the Web
Re: A Python 3 implementation for client-side web programming
#36Earlier quoted context omitted.
Python 'compiles' to .pyc files, but I'm not show how much that compresses them, or if it's possible to reconstruct the source from it.
.pyc files are very reversible. there are open source projects that decompile them to runnable code, the original symbol names are even intact - this means you don't lose the original naming of variables, functions, arguments, etc.
Re: A Python 3 implementation for client-side web programming
#37Earlier quoted context omitted.
The ctx global and 'from html import *' are just part of the demo code. Look at line 289 of the HTML file where ctx is initialized. It's not some magic thing baked into Brython, it's just sample code. Of course you could write either of these in any way you prefer.
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.
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.
Re: A Python 3 implementation for client-side web programming
#38I can't believe all the negative comments here. Someone has implemented Python in JavaScript. I personally think that is incredible.
I think it's the hubris that's putting people off: > Brython is designed to replace Javascript as the scripting language for the Web
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.
Re: A Python 3 implementation for client-side web programming
#39Earlier quoted context omitted.
I think it's the hubris that's putting people off: > Brython is designed to replace Javascript as the scripting language for the Web
That's a silly complaint. Doesn't every language designer feel that their product is better than the thing it desires to replace?
Yes, I know you can declare a function inside another and you get a closure. But, JavaScript's syntax is just nicer.
Re: A Python 3 implementation for client-side web programming
#40Earlier quoted context omitted.
Javascript is a prerequisite of the modern web. Refusing to accept that is absurd.
>Javascript is a prerequisite of the modern web. Citation needed.
The technologies have evolved... Why are you trying to keep us in the stone age? Or why do you expect backwards compatibility?