Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
amitjoshi

Which One is Better Python or Javascript?

Recommended Posts

Posted · Original PosterOP

Hello All, 

 

I am just confused to choose between Python and javascript. Which programming language is more effective as a future point of view. After 5 years which programming language trends should high Python vs Javascript? I have google it to see which is better and find many blogs but still i am confused.

Link to post
Share on other sites
11 minutes ago, amitjoshi said:

Hello All, 

They're just used for different things

C/C++ are unlikely to ever go out of style. 

 

But something like Python or Lua is easier to learn and do basic things with.

or do HTML for web stuff

Or do assembly if you have an IQ above 120


I edit my posts a lot

Link to post
Share on other sites

Javascript is a script language. Python is considered as programming language. the main difference....programming languages are richer and dont demand running in browsers (in short words and it is not just that). Javascript for the Web and Python for Web or not is another distinction. Decide wht you want to program and then choose. but....after that you may have even more dilemas...

Link to post
Share on other sites

Both are widely used, neither will disappear in any near future.

Both can be used for web backend frameworks, while Python is also used a lot for AI/ML purposes and Javascript is also used for web frontend.

 

One is not better than the other. They are used differently, they are different, both have pros and cons. It's really your personal performance, which you like more and which fits you more.


Skynet: MacBook Pro Late 2016 Space Gray | i7-6820HQ 2.7 GHz | 16 GB LPDDR3 | Radeon Pro 455 2048 MB | 512 GB NVMe SSD | 15" 2880x1800

HAL9000: Intel i5-9600k | Cryorig M9 | 16 GB Corsair Vengeance LPX DDR4 3200 MHz | Gigabyte Z390I AORUS PRO WIFI | MSI GTX 1080 Ti SeaHawk X | 1 TB Samsung 970 Evo Plus + 1 TB Crucial MX500 + 256 GB Samsung 850 Pro | Corsair TX650M | NZXT H210i | LG 34UM95 34" 3440x1440

Hydrogen server: Xeon E5-2675 v3 | Cooler Master Hyper 212X | 64 GB Kingston/Samsung DDR4 ECC | Asus Z10PA-D8 | Corsair HX1000 | 256 GB Samsung 850 Evo + 3x 3 TB WD Red + 2 TB Seagate | Fractal Design Define R5 | unRAID 6.7.0

Carbon server: Fujitsu PRIMERGY RX100 S7p | Xeon E3-1230 v2 | 16 GB DDR3 ECC | 60 GB Corsair SSD & 250 GB Samsung 850 Pro | Intel i340-T4 | ESXi 6.5.1

Big Mac cluster: 2x Raspberry Pi 2 Model B | 1x Raspberry Pi 3 Model B | 2x Raspberry Pi 3 Model B+

Link to post
Share on other sites
49 minutes ago, amitjoshi said:

Hello All, 

 

I am just confused to choose between Python and javascript. Which programming language is more effective as a future point of view. After 5 years which programming language trends should high Python vs Javascript? I have google it to see which is better and find many blogs but still i am confused.

I have used both. I used python for Video game design while in school, but i tended to use JavaScript for website design. just use whatever will suit your need better.

Link to post
Share on other sites
55 minutes ago, ckinfos said:

programming languages are richer and dont demand running in browsers

not true are all, JavaScript code runs perfectly fine without a browser inside nodeJS.

 

I have used node (JavaScript) to, create financial CRM at work, tools to mass migrate mongodb data, to create CSV from json dumps, to create chate rooms and many more.
 


                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to post
Share on other sites
2 hours ago, amitjoshi said:

Which programming language is more effective as a future point of view.

C. ;)

 

Python is probably more flexible and less illogical than JavaScript, but the syntax is restrictive (whitespace counts as syntax and Python forces you to format your code in a certain way or else it won't even work). Mind that the WebAssembly "standard" (yet to see widespread usage) allows you to use any programming language for web-related things (except using the DOM), so chances are you will never have to deal with its shortcomings in the foreseeable future.

 

Both Python and JavaScript can be used as a scripting language. I, personally, use Perl and Lisp for that.


Write in C.

Link to post
Share on other sites
1 hour ago, vorticalbox said:

not true are all, JavaScript code runs perfectly fine without a browser inside nodeJS.

 

I have used node (JavaScript) to, create financial CRM at work, tools to mass migrate mongodb data, to create CSV from json dumps, to create chate rooms and many more.
 

that does not give the meaning of a programming language though....They need...an application server to run but Python provides an executable as C/c++ does. Yes you can build everything....but you need a server for that it is a script language! Thats their category. It is not good it is not bad. You can cut a cake with a knife ...but you can too with a fork....That does not make it for that purpose!

Link to post
Share on other sites
29 minutes ago, ckinfos said:

They need...an application server to run

node has binary just like python does...


                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to post
Share on other sites

ok. learn javascript then. it does everything....but learn nodejs too....you will need it to run it!

Link to post
Share on other sites
3 hours ago, ckinfos said:

Javascript is a script language. Python is considered as programming language. the main difference....programming languages are richer and dont demand running in browsers (in short words and it is not just that).

This is just false. Javascript is as much of a programming language as any other. Both are interpreted so both can be used for scripting, though for system scripting you'd probably want to use Python. Javascript also does not require a browser to run.


...is there a question here? 🤔

sudo chmod -R 000 /*

What is scaling and how does it work? Asus PB287Q unboxing! Console alternatives :D Watch Netflix with Kodi on Arch Linux Sharing folders over the internet using SSH Beginner's Guide To LTT (by iamdarkyoshi)

Sauron'stm Product Scores:

Spoiler

Just a list of my personal scores for some products, in no particular order, with brief comments. I just got the idea to do them so they aren't many for now :)

Don't take these as complete reviews or final truths - they are just my personal impressions on products I may or may not have used, summed up in a couple of sentences and a rough score. All scores take into account the unit's price and time of release, heavily so, therefore don't expect absolute performance to be reflected here.

 

-Lenovo Thinkpad X220 - [8/10]

Spoiler

A durable and reliable machine that is relatively lightweight, has all the hardware it needs to never feel sluggish and has a great IPS matte screen. Downsides are mostly due to its age, most notably the screen resolution of 1366x768 and usb 2.0 ports.

 

-Apple Macbook (2015) - [Garbage -/10]

Spoiler

From my perspective, this product has no redeeming factors given its price and the competition. It is underpowered, overpriced, impractical due to its single port and is made redundant even by Apple's own iPad pro line.

 

-OnePlus X - [7/10]

Spoiler

A good phone for the price. It does everything I (and most people) need without being sluggish and has no particularly bad flaws. The lack of recent software updates and relatively barebones feature kit (most notably the lack of 5GHz wifi, biometric sensors and backlight for the capacitive buttons) prevent it from being exceptional.

 

-Microsoft Surface Book 2 - [Garbage - -/10]

Spoiler

Overpriced and rushed, offers nothing notable compared to the competition, doesn't come with an adequate charger despite the premium price. Worse than the Macbook for not even offering the small plus sides of having macOS. Buy a Razer Blade if you want high performance in a (relatively) light package.

 

-Intel Core i7 2600/k - [9/10]

Spoiler

Quite possibly Intel's best product launch ever. It had all the bleeding edge features of the time, it came with a very significant performance improvement over its predecessor and it had a soldered heatspreader, allowing for efficient cooling and great overclocking. Even the "locked" version could be overclocked through the multiplier within (quite reasonable) limits.

 

-Apple iPad Pro - [5/10]

Spoiler

A pretty good product, sunk by its price (plus the extra cost of the physical keyboard and the pencil). Buy it if you don't mind the Apple tax and are looking for a very light office machine with an excellent digitizer. Particularly good for rich students. Bad for cheap tinkerers like myself.

 

 

Link to post
Share on other sites
1 hour ago, ckinfos said:

ok. learn javascript then. it does everything....but learn nodejs too....you will need it to run it!

JavaScript and nodeJS are basically the same other that in node you have require function to import packages but has the benefit of running in both the browser on as a script on your machine.

I never said to "learn JavaScript it does everything" merely noting that JavaScript does not require a browser to run.

I still love python a whole lot.


                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to post
Share on other sites
14 hours ago, vorticalbox said:

JavaScript and nodeJS are basically the same other that in node you have require function to import packages but has the benefit of running in both the browser on as a script on your machine.

I never said to "learn JavaScript it does everything" merely noting that JavaScript does not require a browser to run.

I still love python a whole lot.

yes but we end up....discussing what i said at start (using few words instead of  taking 2 pages to discuss the differences juts for giving him a quick answer)....without answering our friends question....as at all forums messing the main QUESTION and its answers! YES all languages even script ones can work with desktop apps BUT Javascript is known YEARS now for the WEB usage because other languages do work better and easier for the desktop apps. THATs what i meant at start! A vauge question was answered in at the least vauge manner!

Link to post
Share on other sites

Definitely python. Developers see JavaScript as an issue big enough to invent a completely new langauge called typescript just to avoid writting in it. Similar to kotlin in the case of java I suppose. 


Sudo make me a sandwich 

Link to post
Share on other sites
On 9/30/2019 at 4:13 AM, amitjoshi said:

Hello All, 

 

I am just confused to choose between Python and javascript. Which programming language is more effective as a future point of view. After 5 years which programming language trends should high Python vs Javascript? I have google it to see which is better and find many blogs but still i am confused.

Javascript keeps gaining yards at but at a slow pace. Python do get more and more support so the growth is much faster in comparaison. I do believe in 3 to 5 years they should be pretty much equivalent in terms of support and amount of people using it daily. But like other said they are not used (doesn't mean they can't) for the same thing.

 

It's like choosing between Mayonnaise and Peanut butter both are spreads (language) that you can put on bread but the real question is : Is the final product is a toast or a club sandwich ?

Link to post
Share on other sites
1 hour ago, wasab said:

Definitely python. Developers see JavaScript as an issue big enough to invent a completely new langauge called typescript just to avoid writting in it. Similar to kotlin in the case of java I suppose. 

that's not true, typescript just enforces types on to JavaScript while coding, changes nothing while in development.


                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to post
Share on other sites
3 minutes ago, vorticalbox said:

changes nothing while in development.

Except all the runtime bugs you have to debug that are not made obvious. 


Sudo make me a sandwich 

Link to post
Share on other sites
On 10/1/2019 at 3:55 PM, wasab said:

Except all the runtime bugs you have to debug that are not made obvious. 

Pythong is also dynamicially typed and therefore just as horrible to write as javascript, but it includes even more pitfalls that js imo... Typescript is just a superscript of Javascript, any valid Javascript code is also valid Typescript code

Link to post
Share on other sites

@amitjoshi I would say it depends on your personal objectives and career plans.

 

Both Js and Python are great languages and safe to invest learning them. I consider Python a more general purpose programming language, learning it might help you grasp more about computer science. 

Js on the other hand is fast moving language as it's the only language that runs in browser (excluding all languages that compiles to webassembly). It's community is incredibly active and the tools for JS are incredible. Working with NPM is great, working with Virtual Environment for python is mess.

 

Python and JavaScript/NodeJs uses two different concurrency models (pep-0583 vs Event Loop) that make NodeJS more efficient for backend/server applications because IO are quick and almost always non blocking. CPython (the default implementation of Python) suffers from bad design (cf. Global Interpreter Lock).

 

In general Python is really appreciated and common within the scientist community. Jupyter Notebooks is a very cool tools.

If you want to learn general purpose computer science, I believe Python would give you better experience and learning material.

If you want to make web or server apps really quick, with good performance, I would recommend JS.

 

I personally enjoy JS way more because of its tooling. Even if I miss some parts of Python (string and list manipulation).

 

Both are great anyway :)

 

Link to post
Share on other sites
On 10/2/2019 at 5:57 PM, probE466 said:

Pythong is also dynamicially typed and therefore just as horrible to write as javascript, but it includes even more pitfalls that js imo... Typescript is just a superscript of Javascript, any valid Javascript code is also valid Typescript code

I felt python interpretors throws more error and prints out more info though instead of just objects/varibles undefined everywhere then keep on happily running. That's my experience at least. 


Sudo make me a sandwich 

Link to post
Share on other sites
On 10/1/2019 at 1:36 PM, wasab said:

Definitely python. Developers see JavaScript as an issue big enough to invent a completely new langauge called typescript just to avoid writting in it. Similar to kotlin in the case of java I suppose. 

You've just made a ridiculous claim literally out of nowhere. SASS is a superset of CSS similar to how TypeScript is a superset of JavaScript - are you going to claim CSS is terrible also? I swear, every so often I come on this forum and you're making crazy claims every time. 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×