Discuss Scratch
- Pufferfish_Test
-
500+ posts
js or python
It depends on what you want to do. Python is great for data mangling, as I like to call it, but if you want to share it with other people, it can be difficult compared to js - js can just be run in the console in any site (yes, I know, csp but that's an exception), and can often also be run on a server using node.js, whereas to run python you need to install python, or find a virtual machine (a repl or glitch project maybe) that you can download it on. Js is capable of making some pretty complex graphics when combined with html, something which you can't do particularly easily with python. If course, the syntax is completely different, and isn't really comparable; most people find python's syntax easier at first, but I find that more complex syntax is really confusing, whilst I find js' syntax makes more sense and is more consistent - to a certain extent.
In the end, there isn't one that's better. It's all down to personal preferences.
although python has a package for everything
In the end, there isn't one that's better. It's all down to personal preferences.
although python has a package for everything
- Maximouse
-
1000+ posts
js or python
Ijs can just be run in the console in any site (yes, I know, csp but that's an exception), and can often also be run on a server using node.js, whereas to run python you need to install pythonThere is a Python interpreter written in JavaScript. It also has a console.
There are so many graphics libraries for Python – tkinter is even a part of the standard library. Js is capable of making some pretty complex graphics when combined with html, something which you can't do particularly easily with python.
Python's syntax is stricter, which means it's much harder to not notice that you did something wrong. In JavaScript many common mistakes, such as missing semicolons, don't make the syntax invalid but may cause it to behave differently (automatic semicolon insertion). Python also enforces correct indentation. The JavaScript syntax isn't bad, but I think C-style syntax in general is relatively ugly compared to Python because it uses so many different symbols. If course, the syntax is completely different, and isn't really comparable; most people find python's syntax easier at first, but I find that more complex syntax is really confusing, whilst I find js' syntax makes more sense and is more consistent - to a certain extent.
True. In the end, there isn't one that's better. It's all down to personal preferences.
although python has a package for everything
An important advantage of Python you didn't mention is its standard library – you can do a lot of things without even installing a package. The modules it contains include:
- Text processing
- Working with text encodings and binary data
- Date and time calculations
- Various data structures
- Mathematical operations
- Functional programming
- Working with files
- Serializing Python objects
- SQLite
- Different data compression formats
- Reading and writing CSV and similar file formats
- Parsing command line arguments (although I would recommend using a library for that)
- Log files
- Using functions written in C
- Threads
- Multiprocessing
- Asynchronous I/O (unfortunately not as good as JavaScript promises)
- Networking
- JSON
- Media types
- Base64 encoding and decoding
- HTML
- XML
- Interacting with web browsers
- CGI
- WSGI
- Working with URLs
- HTTP requests (again, a library is recommended instead)
- FTP, IMAP, SMTP etc. protocols
- SMTP servers
- UUIDs
- HTTP servers
- IP addresses
- Working with some media files
- Converting between color systems
- gettext
- Turtle graphics
- Graphical user interfaces (tkinter)
- Working with various language features (e.g. bytecode files)
You would need a library to do most of these things in JavaScript (or implement them yourself).
- ninjaMAR
-
1000+ posts
js or python
I like python better because I find it easier to learn and use
Last edited by ninjaMAR (March 1, 2021 22:12:46)
- Maximouse
-
1000+ posts
js or python
Another reason why Python is better is strict input handling. In JavaScript division by zero returns infinity, accessing an attribute that doesn't exist returns undefined and trying to concatenate a string with a number converts it to a string. In Python all of them are errors, which makes sense because these typically aren't things you want to do, and if they are explicit is better than implicit.
- gdpr5b78aa4361827f5c2a08d700
-
1000+ posts
js or python
Personally I prefer JS (but C# better than than both of them… combined.). Python has wierd syntax and if you want other people to run your program, you'll either have to bundle python with it, have it download at install-time, or just have them install it.
- Maximouse
-
1000+ posts
js or python
C# is a compiled language, you can't compare it with Python or JavaScript. C# better than than both of them… combined.
I don't know why people say this. Python's syntax looks much cleaner than C-style syntax. Python has wierd syntax
You can run Python in a web browser, as I mentioned in a previous post. If you want other people to run your program, you'll either have to bundle python with it, have it download at install-time, or just have them install it.
(If you want to make a standalone application in JavaScript, you need to bundle node.js, a web browser, or both with it.)
- gdpr5b78aa4361827f5c2a08d700
-
1000+ posts
js or python
ElectronJS and react-native are extremely simple to build for both the web and native You can run Python in a web browser, as I mentioned in a previous post.
(If you want to make a standalone application in JavaScript, you need to bundle node.js, a web browser, or both with it.)
I don't know why people say this. Python's syntax looks much cleaner than C-style syntax.This is a matter of opinion, I prefer C(++/#) and Java style syntax
C# is a compiled language, you can't compare it with Python or JavaScript.Its still a language though, just like c and c++ and there are lots of benifits of a compiled language, and im just stating my preffered language
- Maximouse
-
1000+ posts
js or python
So Python isn't? PyInstaller is simple to use too, and its output is relatively small (Python itself is only about 4 MB).ElectronJS and react-native are extremely simple to build for both the web and native You can run Python in a web browser, as I mentioned in a previous post.
(If you want to make a standalone application in JavaScript, you need to bundle node.js, a web browser, or both with it.)
- gdpr5b78aa4361827f5c2a08d700
-
1000+ posts
js or python
JS is easier, doesnt mean python isnt easySo Python isn't? PyInstaller is simple to use too, and its output is relatively small (Python itself is only about 4 MB).ElectronJS and react-native are extremely simple to build for both the web and native You can run Python in a web browser, as I mentioned in a previous post.
(If you want to make a standalone application in JavaScript, you need to bundle node.js, a web browser, or both with it.)
- ninjaMAR
-
1000+ posts
js or python
You can run scripts online by making a post request to It depends on what you want to do. Python is great for data mangling, as I like to call it, but if you want to share it with other people, it can be difficult compared to js - js can just be run in the console in any site (yes, I know, csp but that's an exception), and can often also be run on a server using node.js, whereas to run python you need to install python, or find a virtual machine (a repl or glitch project maybe) that you can download it on. Js is capable of making some pretty complex graphics when combined with html, something which you can't do particularly easily with python. If course, the syntax is completely different, and isn't really comparable; most people find python's syntax easier at first, but I find that more complex syntax is really confusing, whilst I find js' syntax makes more sense and is more consistent - to a certain extent.https://webpython.ninjamar.repl.co/api/runpy
In the end, there isn't one that's better. It's all down to personal preferences.
although python has a package for everything
Post request
{ "script":"print('hey')" }
{ "script":"print('hey')" "output":"hey" "timestamp":123456789 }
- gosoccerboy5
-
1000+ posts
js or python
Would javascript be a better language if it weren't for old browsers and scripts forcing backwards compatibility?
- Maximouse
-
1000+ posts
js or python
Possibly, but in this case it would probably removed and replaced with something new. Would javascript be a better language if it weren't for old browsers and scripts forcing backwards compatibility?
- gdpr5b78aa4361827f5c2a08d700
-
1000+ posts
js or python
Notably WebAssemblyPossibly, but in this case it would probably removed and replaced with something new. Would javascript be a better language if it weren't for old browsers and scripts forcing backwards compatibility?
- gdpr5b78aa4361827f5c2a08d700
-
1000+ posts
js or python
nobody prefers margarinealthough python has a package for everythingnpm go brrrr
notoriously pedantic magistrate
note per minute
napping panda missionaries
nearsighted prank master
nerdy pun mavens