js or python
id: 489569
category: Advanced Topics
posts: 561
9gr
loading
i use js
which one is better tho
which one is better tho
Pufferfish_Test
loading
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
DipLeChip
loading
python best js cannot compete
Maximouse
loading
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
loading
I like python better because I find it easier to learn and use
gosoccerboy5
loading
Javascript is better than python on infinity counts
Maximouse
loading
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.
SlenTheOoof
loading
I really don't know. Js is easier in my opinion.
potatophant
loading
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
loading
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.)
potatophant
loading
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
loading
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.)
potatophant
loading
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
loading
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
loading
Would javascript be a better language if it weren't for old browsers and scripts forcing backwards compatibility?
Maximouse
loading
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?
potatophant
loading
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?
uwv
loading
although python has a package for everythingnpm go brrrr
potatophant
loading
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
gosoccerboy5
loading
Javascript has played us for absolute foolsI hope that's sarcastic
snip
uwv
loading
it is notJavascript has played us for absolute foolsI hope that's sarcastic
snip
gdpr5b78aa4361827f5c2a08d700
loading
see told u js badit is notJavascript has played us for absolute foolsI hope that's sarcastic
snip
js bad
9gr
loading
nodejs python MAD (Michigan Algorithm Decoder)
wait theres a programming language called mad lol
-Digital_Designer-
loading
JavaScript is used for web development, Python is used for games, software, and other things.
To be a programmer you need to use something like:
C, C# or C++
Python
To be a web developer you need to use:
HTML
CSS
JavaScript
To be a programmer you need to use something like:
C, C# or C++
Python
To be a web developer you need to use:
HTML
CSS
JavaScript
Pufferfish_Test
loading
npm isn't that great and python has better built in libraries than jsalthough python has a package for everythingnpm go brrrr
Atm wasm still needs js to run in the browser/in node/deno, and it needs to be compiled, which I don't really think is where development is going these days. Also the point of wasm is that it's sandboxed so I doubt we'll get any form of i/o or dom within the near future (next 5-10 years probably). Feel free to prove me wrong when we get a fully unsandboxed standalone wasm environment with dom and i/o that requires no build steps in 3 years.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?
Javascript is still a programming language, therefore you can be a programmer using js - especially as you can use node or deno server side. JavaScript is used for web development, Python is used for games, software, and other things.
To be a programmer you need to use something like:
C, C# or C++
Python
To be a web developer you need to use:
HTML
CSS
JavaScript
That's kind of offensive saying that js programmers aren't proper programmers
Also many other things can be used for web development, including php and webassembly.
Maximouse
loading
And Python. Almost any programming language can be used for server-side development. Also many other things can be used for web development, including php and webassembly.
gdpr5b78aa4361827f5c2a08d700
loading
Python? JavaScript is used for web development, Python is used for games, software, and other things.
To be a programmer you need to use something like:
C, C# or C++
Python
To be a web developer you need to use:
HTML
CSS
JavaScript
Games?
not realy
Pufferfish_Test
loading
I meant client side web development… but that's very trueAnd Python. Almost any programming language can be used for server-side development. Also many other things can be used for web development, including php and webassembly.
It's a shame that the days of java applets in tge browser are gone… then I would have said that java was the best out of python and js
before es6 js was bad
In fact I'd still say that java's one of the best programming languages out there
But that is not the point of this thread so I'll stop discussing java
Maximouse
loading
There are games written in Python, but the engine itself is typically written in C, otherwise it would be too slow. Python?
Games?
not realy
9gr
loading
To be honest, I prefer javascript over python.
because I am more proficient in lua and javascript can be used client and server side, just like lua
because I am more proficient in lua and javascript can be used client and server side, just like lua
trueJavaScript is used for web development, Python is used for games, software, and other things.Python?
To be a programmer you need to use something like:
C, C# or C++
Python
To be a web developer you need to use:
HTML
CSS
JavaScript
Games?
not realy
Javascript is a programming language. JavaScript is used for web development, Python is used for games, software, and other things.
To be a programmer you need to use something like:
C, C# or C++
Python
To be a web developer you need to use:
HTML
CSS
JavaScript
9gr
loading
But i normally don't use that in javascript for libraries. I just use npm for nodejsModern JavaScript also uses import.But python is colons and uses import stuff, it just doesn't look rightPython can also be used javascript can be used client and server side, just like luaclient and server side.
rip I ran out of reasons
gosoccerboy5
loading
Personally, brackets look more structured and solid to me, instead of depending on whitespace for your program to run properly. JS uses brackets
Imagine minifying a python program.
Maximouse
loading
How do you use npm packages without import? But i normally don't use that in javascript for libraries. I just use npm for nodejs
rip I ran out of reasons
Whitespace is a more visual way to indicate nesting. Personally, brackets look more structured and solid to me, instead of depending on whitespace for your program to run properly.
Imagine minifying a python program.There is no reason to do that because you can use bytecode.
Rendangbike2
loading
while True: print("Python is the best!")
while (true){ console.log("or is JS the best?")};
Python is MUCH EASIER THAN JS. print is much more understandable than console.log, I mean….. eurghhh.
ninjaMAR
loading
You forgot the closing bracketwhile True: print("Python is the best!")I'm biased towards Python but….while (true){ console.log("or is JS the best?")
Python is MUCH EASIER THAN JS. print is much more understandable than console.log, I mean….. eurghhh.
Rendangbike2
loading
See? You forgot the closing bracket
-Digital_Designer-
loading
Yes, JavaScript is a programming language, I already know this.
ninjaMAR
loading
I doSee? You forgot the closing bracket
gosoccerboy5
loading
Um.. shouldn't that semicolon be inside the curly bracket not outsidewhile (true){ console.log("or is JS the best?")};
gosoccerboy5
loading
*makes a mistake in the code*See? You forgot the closing bracket
*blames it on the language*
uwv
loading
i can make games with javascript smh JavaScript is used for web development, Python is used for games, software, and other things.
To be a programmer you need to use something like:
C, C# or C++
Python
To be a web developer you need to use:
HTML
CSS
JavaScript
9gr
loading
snakei can make games with javascript smh JavaScript is used for web development, Python is used for games, software, and other things.
To be a programmer you need to use something like:
C, C# or C++
Python
To be a web developer you need to use:
HTML
CSS
JavaScript
potatophant
loading
unityscript also (sucks but works)snakei can make games with javascript smh JavaScript is used for web development, Python is used for games, software, and other things.
To be a programmer you need to use something like:
C, C# or C++
Python
To be a web developer you need to use:
HTML
CSS
JavaScript
uwv
loading
there was one time i started recreating minecraft in javascript, i havent finishedsnakei can make games with javascript smh JavaScript is used for web development, Python is used for games, software, and other things.
To be a programmer you need to use something like:
C, C# or C++
Python
To be a web developer you need to use:
HTML
CSS
JavaScript