Why People Use Python Even If It’s Slow

Поділитися
Вставка
  • Опубліковано 18 лис 2024

КОМЕНТАРІ • 320

  • @AHR_James
    @AHR_James 3 роки тому +258

    I'd argue speed often is everything, it's just that the relevant speed includes development, not just run-time.

    • @AHR_James
      @AHR_James 3 роки тому +3

      @@ToolwatchBoutique getting python in the finished product will be an uphill challenge though, don't think anyone has got it through approvals?

    • @konstantinrebrov675
      @konstantinrebrov675 3 роки тому +15

      People say that Python has a higher speed of development, probably are experts in Python language only. For me development in C/C++ is faster. Whenever I work with Python I have to fight against the interpreter.
      Indentation error, how annoying! Or it runs through 200 lines of code, and then crashes!

    • @MrHaggyy
      @MrHaggyy 3 роки тому +7

      @@konstantinrebrov675 i really like python for GUIs and parser. Also quite nice to automate basic office stuff and administration tasks without expensive software.

    • @0xCAFEF00D
      @0xCAFEF00D 3 роки тому +6

      If you account for bugs dynamically typed languages have a pretty big time cost as project complexity increases.
      But for trivial code that calculation is different.

    • @asandax6
      @asandax6 3 роки тому +4

      @@MrHaggyy You can automate anything with C++ as well hack I am now doing things in Rist because the syntax of rust is short like python. The only downside to Rust is like C when compiling it's slow but once Running blazing fast.

  • @Phil-rt4kp
    @Phil-rt4kp 3 роки тому +189

    This guy is even good at drawing

  • @cambamboozle
    @cambamboozle 3 роки тому +20

    to me the brilliance of python is that it can be used to glue together lots of libraries in c++ or rust to speed up development time of stuff that leverage those libraries while still benefiting from the speed of compiled languages.

  • @benebene9525
    @benebene9525 3 роки тому +52

    In c++ you can divide an int by a float too. all you need is a decimal point. Integer division is used by default for math between int and int, but oftentimes that is exactly what you want. Forcing float math onto everything is more annoying than helpful.

    • @besherkitaz4529
      @besherkitaz4529 5 місяців тому

      You can simply use // to have integer division in Python.

  • @Shaam_Ark
    @Shaam_Ark 3 роки тому +25

    What python makes up in time is its "one language does it all" approach

    • @segueoyuri
      @segueoyuri 2 роки тому +4

      you can do pretty much everything with java or c++ too. The thing about python is the "pseudocode that runs"

    • @wauwau1
      @wauwau1 Рік тому +1

      Tbh python's not perfect, but it's definitely the first right step towards simple and easy programming (which is the direction we should strive for) I usually compare programming languages with other inventions such as cars; having a choker as well as a manual transmission with a clutch may give you more control over the car, however, the tradeoff is added complexity as well as more strain on the human, which isn't ideal for something that's supposed to "drive itself". I mean, do you really want to start your car with a manual hand crank? The same principle can be applied to programming languages
      The goal here is to "automate" a programming language in such a way that it's efficient as well as fast while also being simple to use, humans shouldn't be concerned about declaring datatypes or memory management

  • @hellmrf
    @hellmrf 3 роки тому +22

    Most of the "arguments" used to explain the slowness of Python actually don't make any sense (or are deliberately oversimplified to take into account the audience's level of knowledge?). Python is slow for a couple of reasons. One is being interpreted, so the compiler (that doesn't exist) doesn't have that chance to optimize out the code and make It faster. It has nothing to do with "environment" or "dynamically typing". However, if you compile your C program with -O0 (no optimization), it still will run faster than Python. So it takes us to the second point. It's dynamically typed at runtime. It means that operations cannot be optimized for specific types, and all inferring needs to happen every time, during runtime. In languages like Julia (dynamic and JIT-compiled), however, the compiler is able to infer the types at compile time and use monomorphization to generate specific versions of each function for each type, which allows compile-time optimization and takes Julia to the level of C in performance. It means that Julia is still dynamic at the development stage (so you're free from annotating all the types), but its machine code is actually statically typed and optimized, just like C (at least for well-written and type-stable codes). Lastly, the argument "speed isn't everything" is also weak to explain the popularity of Python in ML and Scientific communities. The actual explanation for that is the marketing done by Google, just like Go. That initial marketing built an absurdly vast (and increasing) ecosystem to the point that absolutely everything today has a library for Python (commonly written in "real languages" like C++, Rust, Fortran, or Julia).

    • @thomascatalan2425
      @thomascatalan2425 3 роки тому +4

      why are u mad

    • @hammerheadcorvette4
      @hammerheadcorvette4 3 роки тому +4

      People usually ignore the fact that if your program needs a speed boost, you can compile that potion of it...

    • @oliverreviews8496
      @oliverreviews8496 2 роки тому

      If you want to fasten your Python code you can use annotations. So it definitely takes some optimization and cost to be a dynamically typed language

  • @WouterStudioHD
    @WouterStudioHD 3 роки тому +70

    6:45 that's not what is meant by "interpreted". Interpreted means that it is not compiled to machine code, but executed on the fly by a virtual machine. C can also be interpreted, but that doesn't change the fact that you need to cast explicitly.

    • @arnobchowdhury9641
      @arnobchowdhury9641 3 роки тому

      Can you explain a bit more about 'virtual machine' and 'on the fly' part? I read about the difference between compiled and interpreted languages multiple times but still get confused.

    • @WouterStudioHD
      @WouterStudioHD 3 роки тому +11

      @@arnobchowdhury9641 compiled: translated from one language to another. This most of the time means translated from high level language (e.g. C, C++, Swift) to a low level language (e.g. assembly, bytecode, or machine code).
      When the target is machine code, this can run natively on the CPU, meaning the CPU understands the language and can execute each instruction. When the target language is for example bytecode, this means the CPU doesn’t understand that language. To run this you use a “virtual machine” or an “interpreter”. This is a program that understands what action to perform for each instruction in the bytecode. Therefore it’s an abstract CPU, hence the name “virtual”.

    • @arnobchowdhury9641
      @arnobchowdhury9641 3 роки тому +5

      @@WouterStudioHD This is why a mentor is important. Thanks a lot. I understand now. You explained it very well.

    • @WouterStudioHD
      @WouterStudioHD 3 роки тому +2

      @@arnobchowdhury9641 Thanks for the compliment, you’re most welcome.

    • @tarunkumartarlana429
      @tarunkumartarlana429 3 роки тому +1

      What is bytecode, will you explain me differences between machine code and byte code

  • @SlimThuis
    @SlimThuis 3 роки тому +25

    The hidden amazon giftcards were very fun! The last one was difficult. Was to slow unfortunately but do more plz!

  • @longhoacaophuc8293
    @longhoacaophuc8293 3 роки тому +11

    In my experience as a physicist, the only advantage of python is that it has more "functions" (I think people call them methods in python) than c/c++. This save me a lot of time writing a whole new function for a simple task. However, I still prefer c/c++ because of speed.

    • @imerence6290
      @imerence6290 2 роки тому +5

      A method is function encapsulated and abstracted away in a class(see pillars of object oriented programming). Almost every mainstream language have "methods"

  • @JoaoMiguel-mw1rm
    @JoaoMiguel-mw1rm 3 роки тому +1

    Man, I've been following you since you started your channel and reached 10,000 subscribers, I'm your fan! It's great to see you with half a million! From Brazil, for you!

  • @nscarlos25
    @nscarlos25 3 роки тому +7

    2:42 I believe that virtual environments have nothing to do with execution speed in Python. Python interpreter works the same way regardless of virtual environments.

    • @TheSumitBanik
      @TheSumitBanik 3 роки тому

      Agreed. It just provides a seperate workspace/env. to work on.

    • @smibssmibs
      @smibssmibs 3 роки тому

      Exactly. The statement "You have to actually create a virtual environment to run your python code" is simply wrong and shows misunderstanding of the "virtual environment" term.
      In fact, virtual environment only allows to manage isolated python environment without spoiling globally installed python with libraries you need to install. The speed the code runs is the same when run using virtual environment and when using globally installed one.

    • @JusticeNDOU
      @JusticeNDOU 3 роки тому

      @@smibssmibs this statement is false python works differently in different virtual environments provided the virtual environments are actually different think carefully about this issue before you answer

  • @haisongqi3228
    @haisongqi3228 3 роки тому +29

    5:35 Kalle is well aware of the fact that most people fast forward through the sponsoring section. :)
    Edit: Another one at 8:50 at the top left corner.

    • @klvp_techie
      @klvp_techie 3 роки тому

      You redeemed any giftcard

    • @haisongqi3228
      @haisongqi3228 3 роки тому

      @@klvp_techie nope lol

    • @josepauljenson8789
      @josepauljenson8789 3 роки тому

      Where is the second one?

    • @haisongqi3228
      @haisongqi3228 3 роки тому

      @@josepauljenson8789 8:50 Just change play speed to 0.25x so you can see it(and of course pause the video if needed) :)

    • @klvp_techie
      @klvp_techie 3 роки тому

      @@josepauljenson8789 when he is drawing the pic, make the speed to 0.25x , you can see when he takeoff his left hand.

  • @NewLondonMarshall
    @NewLondonMarshall 3 роки тому +6

    I think speed isn't everything, but instead efficiency is everything. High efficiency code is not only faster but uses less memory. This is crucial for lots of use cases. It also prevents bloated software like Microsoft Teams and other electron apps taking over thankfully!

  • @timcates4261
    @timcates4261 3 роки тому +9

    Honestly my biggest issue with python is that I have to tailor my use case for it. I have found that using node and javascript is magnitudes faster for a lot of tasks. So I end up almost always doing python scripts for things that cant be easily done in node rather than relying on python because of this. Recently I had a document parsing application for example, that in python would take several minutes to complete but when I ported it over to node to work on a back-end I had already set up it took less than a minute.

  • @paco3447
    @paco3447 3 роки тому +27

    Due its broad use in the academic and scientific field. Julia is the logical replacement (or at least it should) for Python. Another obstacle is the Apple users' obsession with.

    • @janikwindisch6643
      @janikwindisch6643 3 роки тому +1

      I don't understand anything, but I want to get into coding. Could you please elaborate?

    • @paco3447
      @paco3447 3 роки тому +2

      @@janikwindisch6643 Because is somehow easy to code and therefore gained popularity in the aforementioned fields, resulting in numerous libraries that are highly dependent on as a result. The catch, is that python is slow, not multithreaded, needs other C/C++ libs in order to make use of GPU acceleration and so on.

    • @MrCk0212
      @MrCk0212 3 роки тому +3

      Wouldn’t it be better to create a faster Python interpreter? The libraries are treasure of Python and are the efforts of a large community for 2x years. It is like something too large to be replaced.

    • @paco3447
      @paco3447 3 роки тому +1

      @@MrCk0212 That's the point. The huge dependency of libraries. There's already a lot of crap on top of crap to increase performance (bytecode, etc), but I think is a catch 22. Anyway, a substantial amount of main Python libs are already barebones C, so it would be feasible to interface them with Julia.

  • @BrownStain_Silver
    @BrownStain_Silver 5 місяців тому

    Total beginner to Python and programming here. I wrote a program using Python after 3 months of learning that completed a 30+ hour task at work in 2 minutes. The program is based on basic Python and Pandas. It took me like 2 weeks to complete it because I was flipping through textbooks and reading online a lot. I doubt I could say the same learning a low-level language. Yeah, maybe it would run in like 30 in seconds in a low-level language instead but at the end of the day who cares? Reducing something that takes 30 hours to 2 minutes as a total beginner is fantastic and it was fun to write.

  • @tommyv4980
    @tommyv4980 2 роки тому

    UA-cam 'codebasics' perfectly put it, that python is slow if you are using the wrong module and wrong approach. Essentially if you are using the right module for the task then it won't be slow.

  • @georgiostsobys7926
    @georgiostsobys7926 3 роки тому +7

    8:48 the most inner section of the right eye ball of that lady in the picture has the number 50 written with white letters. Is that the hidden gift card? 😎 P.s. Great video!😉

  • @konstantinrebrov675
    @konstantinrebrov675 3 роки тому

    Some people say that the advantage of Python is an interpreter language, rapid prototyping. There actually are interpreters for C/C++ too!
    For example Ch Script, a C+, a dialect of C with some extra added features, including the ability to write shell commands directly within the source code, can be used as a replacement for both Python and Bash.
    And there is also Cling, a C++ interpreter recognizing the latest and greatest C++ features, good for testing code, and it even runs in Jupyter notebooks too!

  • @BsktImp
    @BsktImp 3 роки тому +1

    Python now is to what BASIC was for home computing in 80s.

  • @adilmohak
    @adilmohak 3 роки тому +10

    Python is easy to learn, but HARD to master

  • @celvinlelith407
    @celvinlelith407 3 роки тому +1

    Your channel is really addicting

  • @chpsilva
    @chpsilva 11 місяців тому

    Not only speed IS important but SCALABILITY also is fundamental. And Python lacks both.

  • @robimegu3712
    @robimegu3712 3 роки тому +6

    Hi, Kalle! I really appreciate your work and this channel! You motivated me to learn more python. I'm interested especially in ML and AI section.
    Can you make some introduction or complete tutorials about this topics?
    Let's say TensorFlow Introduction ... Something like that:))
    I hope this comment will land in front of you 💙

  • @4w0ken
    @4w0ken 3 роки тому +18

    Well, i dont understand why ppl declaring python as having good syntax and easy readable. i personally find it harder to read than any other bracket based lang

    • @Samuel-th6fw
      @Samuel-th6fw 3 роки тому +3

      Agree. Only having indentation and return statements to determine where funcions start and end makes it harder to read IMO.

  • @S41L0R
    @S41L0R 3 роки тому +1

    Well the trick is if you just learn cpp you don't have to worry about it being strict. Just know what you're doing and you get a faster end product

  • @carsongutierrez7072
    @carsongutierrez7072 3 роки тому

    Appreciate the insight mate about python. Need to start my python learning journey soon.

  • @CallousCoder
    @CallousCoder 3 роки тому

    The virtual environment isn’t a performance penalty. It’s solely the interpretation of an instruction to its actual byte code and then running that byte code, which has overhead. And in Python more so than Java or C# byte code (especially .Net Core 5).
    And in C++ you can use “auto” to make the computer choice the type as well.
    Frankly, I don’t see a reason to develop in Python (and I did a lot of Python from 2000-2010). Back then I liked it because of its “there’s only one way to do something” principle. That was great because it confirmed coding styles. When that was thrown overboard, it lost the only great thing it had going for it.

  • @anb4351
    @anb4351 2 роки тому +1

    Honestly I don't like Python myself but still use it because of all the great libraries and support available for it. It's just better for some use-cases.
    I prefer C# and other C like languages, Maybe it's because I started my programming journey with C++ and those habits and preferences stayed with me, and I believe it's the case for many people who hate on python

  • @navsys6703
    @navsys6703 3 роки тому

    I like all your videos, you are so kind and your videos are really proffesionals. Good luck Halle

  • @MrNatsuDragneel
    @MrNatsuDragneel 3 роки тому

    The sum function is called from c or c ++ language if it is in python pure the speed drops to thousands slower than c, c ++, c# or java.

  • @lurwas
    @lurwas 3 роки тому +1

    Thanks for the video! @9:19, it should be "number_ = np.sum(np.arange(number, dtype=np.int64))" instead of np.range as the video states.

  • @dev_alade
    @dev_alade 3 роки тому

    I love how you are a good teacher

  • @zilog1
    @zilog1 2 роки тому +1

    don't EVER EVER EVER give away gift-cards or coupons or free stuff, your comments WILL BE FULL OF SCAMS tricking users into thinking they have won. YOU HAVE BEEN WARNED.

  • @lighty262
    @lighty262 3 роки тому +1

    PHP 8 & Javascript are also interpreted language, yet they are fast. Specially if you use deno runtime with js.

    • @repotranstech
      @repotranstech 3 роки тому

      Js uses just in time compilation ,hence it's fast python is actually faster than PHP.

    • @lighty262
      @lighty262 3 роки тому

      @@repotranstech Maybe you are talking about previous version of PHP. PHP 8 also use JIT compiler, latest python 3 still slow.

  • @nonae9419
    @nonae9419 3 роки тому

    You don't need to declare types in Rust or C++ and they are as fast or faster than C(auto i = 3;). The key to speed is optimisation. You would think a Python class is equal to a C++ struct but intact it is a std:: unordered_map , and strings in hot paths are always stupid. Python compilers usually do not comply with Python rules so that they can optimise this. Python is slow due to non zero cost abstractions.

  • @charljrhode2
    @charljrhode2 3 роки тому

    Great video, your explanations cleared a few things up

  • @xanthe69
    @xanthe69 2 роки тому

    4 reasons why people use python:
    1. Easy to learn
    2. Requires less debugging
    3. Used in big tech companies (eg. Google , UA-cam)
    4. You can build (almost) anything eg. websites, apps, games

  • @rakeshchowdhury202
    @rakeshchowdhury202 3 роки тому

    Dude uses vim without themes on windows and still looks cool. That's some chad move

  • @gonzalogutierrez970
    @gonzalogutierrez970 3 роки тому +2

    You are measuring the execution time of the programs, but forgetting the time of development, optimization and maintenance of the program. Programmers' time is more important than program execution time

  • @AHR_James
    @AHR_James 3 роки тому +5

    Hiding the codes is a great idea! but I'm beginning to think the 2nd amazon code isn't really there :/ - Damn! found it

    • @SlimThuis
      @SlimThuis 3 роки тому +1

      It’s on the left page of the drawing, just for a split second though. Dont bother, someone already redeemed both

  • @jayhan4063
    @jayhan4063 3 роки тому +1

    Hey like your videos am learning a lot from you thanks

  • @MKataw
    @MKataw 3 роки тому +1

    I found a Reedm code in the phone screen, but it Used, oh my luck.

  • @chiuuuuuuuuuu
    @chiuuuuuuuuuu 3 роки тому +1

    I chose Python over c because I live above sea level

  • @primorock8141
    @primorock8141 3 роки тому +1

    8:45 Nice drawing

  • @adyanrehan3360
    @adyanrehan3360 3 роки тому +30

    Kalle is pissing a lot of c gods now 😂😂 , good video btw I used to be a full stack web dev but now i am a system/kernel dev i know c,c++ currently learning rust.

    • @jeffreydijkstra3391
      @jeffreydijkstra3391 3 роки тому

      Can i ask where you work, and what you kinda kernels you are making? I’m really interested by it😄

    • @adyanrehan3360
      @adyanrehan3360 3 роки тому +1

      @@jeffreydijkstra3391 I don't work yet I am still in high school but started with a simple kernel that prints hello world when booted from grub and this is when a initially started learning c 6 months later I started to work on my own bootloader and all and I contributed a little bit to serenity os too.

    • @adyanrehan3360
      @adyanrehan3360 3 роки тому

      Also I meant don't have a job or something but I do freelance and the thing with kernel programming it's really fun but u can't make good money of your projects

    • @mehregankbi
      @mehregankbi 3 роки тому

      i was a pythonist. tried to learn rust and found out i knew nothing about low-level. so now i'm learning C so that later i can learn rust.
      imagine not getting seg faults and stuff like that.

    • @mehregankbi
      @mehregankbi 3 роки тому

      @@jeffreydijkstra3391 you don't have to make a kernel to be kernel dev. if you change the linux kernel, you're kernel dev.

  • @paretare4946
    @paretare4946 3 роки тому

    More knowledge you are giving me than my college professor .
    Thank you very much bro ❤️❤️❤️❤️❤️

  • @tapion1998
    @tapion1998 3 роки тому +1

    I always find dynamically typed languages to be more annoying to deal with since it really takes away the structure of your code. It's like "Ok, this method gets 2 parameters... What are these parameters exactly? What am I supposed to do with them? How may I treat them?" And in the end you just use the type declaration function baked into python to state, what type of object you're dealing with. Also, all of your casual mistakes are just accepted and interpreted. There are a ton of memes with PHP and such where you add two totally different "types" of objects together and get a thrid completly random type as a result. Have you ever declared a variable INSIDE a foreach loop and then mistakenly assigned it OUTSIDE of it? This would obv. cause an error in a compiler, but PHP lets you run it without problems but the results are just completly fked. And then you're sitting there like: "WTH just happened". I always see the Compiler as a friend that says "There is a type mismatch here", "This one is not defined - what is that?" and most of the time, this really points out your honest mistakes.

  • @michaelnapitupulu9269
    @michaelnapitupulu9269 3 роки тому +6

    And then this video comes when I'm feeling down with my progress in python because I'm currently learn java in college. Thanks Kalle 😁

    • @festus-obi
      @festus-obi 3 роки тому +1

      You can make it - keep pushing harder

  • @derekhoyle5371
    @derekhoyle5371 3 роки тому

    Great information, thank you!
    Was that a Subaru? Good cars

  • @bobuccman1424
    @bobuccman1424 2 роки тому +1

    hey have you tried nim? its compiled, almost entirely python-like and also a lot faster?
    basically python but statically typed

  • @swelarsson86
    @swelarsson86 3 роки тому

    I am a java dev but start to use Python more and more

  • @0x000a5
    @0x000a5 3 роки тому +1

    "Speed of development"

  • @vespervenom2343
    @vespervenom2343 3 роки тому +2

    Can you do a tutorial on how you film your videos. I like the way you do them

  • @powergladius
    @powergladius 3 роки тому +1

    I appreciate the educational content

  • @Aeduo
    @Aeduo 3 роки тому

    Writing native python extensions through the C API is a real bear but it's not bad once you get it working, and yeah it does allow you to do a lot of stuff in python that would be tedious in C and not necessarily need the performance and just handing off tasks to C functions. Best of both worlds, there. I found their tutorials pretty out of date though and had to do a lot of digging around their docs to figure out how to actually do things in the modern way.

  • @myspace5045
    @myspace5045 3 роки тому +3

    I am watching your channel to learn more about computer technology. But, why do I need this python,
    I should study 😆😆😆
    Congratulations, you have 500 subscribers! 🔥🔥🔥🔥🔥
    You have progress friend! 🌠🌠🌠

    • @cedric6941
      @cedric6941 3 роки тому +2

      U good??

    • @CodeDisease
      @CodeDisease 3 роки тому

      @@cedric6941 lmao

    • @GuruTheCoder
      @GuruTheCoder 3 роки тому +1

      R u on something?

    • @myspace5045
      @myspace5045 3 роки тому

      I'm not a coder, that's why relax! Take care yourself! 😉

  • @bjorncalbes7604
    @bjorncalbes7604 2 роки тому

    is python best for software development?

  • @youssefamini7881
    @youssefamini7881 3 роки тому

    Every Friday u get us happy 😊

  • @ParveshKumar-pu8tv
    @ParveshKumar-pu8tv 3 роки тому +1

    Just use assembly like a chad

  • @Rijads
    @Rijads 3 роки тому

    If you are working with data, almost always bottleneck will be the database, and speed of the language doesn't matter, you might have some memory problems if it isn't coded well but speed of the language hardly matters.

  • @guilherme5094
    @guilherme5094 3 роки тому

    This one is easy to answer, because python is easy and yet very powerful.

  • @TJnsn
    @TJnsn 3 роки тому +1

    was a cool idea with the amazon codes, found both :D but they were already used

    • @theonlybonsu
      @theonlybonsu 3 роки тому

      Out of curiosity…where were they?

    • @TJnsn
      @TJnsn 3 роки тому

      @@theonlybonsu one was at 5:36 on the phone display and one was at 8:50 on the left page of the drawing (just a few frames) :)

  • @theawakened7739
    @theawakened7739 3 роки тому

    I love the Amazon Easter eggs 😂😂 though, plz next time don't tell us... Anyways I'm clicking that notification bell right now 🤣🤣🤣

  • @akzholassylbek4010
    @akzholassylbek4010 3 роки тому

    Please, tell me what’s the background music?

  • @سيفالشمري-ض1ث6و

    Can you make a video about the Go programming language?

  • @secrus
    @secrus 3 роки тому +14

    There are mistakes in the video:
    1. Virtual environments in Python make it slower. WRONG
    Virtual environments in Python are just a way to separate different Python versions and libraries used in the project. There is no need to create them, other than encapsulation of project dependencies and their versions. It makes Python run at the same speed as always, because when creating a virtual environment, your Python interpreter executable is copied to the virtual environment directory.
    2. In your languages pyramid, on the top, you put OO languages like Python and Visual languages (WTF are those btw? could you elaborate?) where you put JS (which is also OO language). What about Functional Programming languages like Haskell or Elixir? and languages like Golang? All those are higher abstraction than C, yet you only put OO languages (where btw C++ also belongs and you put it along with C).
    3. Assumption that dividing 10 by 3 will give an error in C. Numeric types in C are semi-compatible, so as long as you assign the result of this operation to float, it will be completely fine.
    4. "Interpreter interprets code and understands what needs to be done". And compilers don't?
    5. Claims that you don't tell python what type you are using are wrong. 7:29 you have `number = 10**7 + 1`. You actually use integer literals, so you do tell Python to use ints. Well, not really* because Python doesn't actually have variables, only pointers (that's why it's so easy to change the type of "variable" in Python).
    6. Associating language being compiled or interpreted with its type system. Those things are distinct. TypeScript for example, while being compiled, still has quite a dynamic type system. "Typescript is just JavaScript", you say? What about Golang? It can infer the variable type based on the assigned value. Don't mix up those two properties of language.
    7. Python is not fully interpreted. It is precompiled (you can find compiled .pyc files in __pycache__ directory in your project).

    • @thedrunknmunky6571
      @thedrunknmunky6571 3 роки тому

      As someone else mentioned before, you _might_ be coming off kinda harsh there with the way you replied. But since you seem to know your stuff, do you suppose C++ will ever get the amazing support/libraries as is there for Python? Or will there be a different language that has lower abstraction levels like C and also the resources of Python? I’ve heard mention of Julia as a successor to C++.

    • @TheIsraelMendoza
      @TheIsraelMendoza 3 роки тому

      Imagine being so grumpy and hater you take the time to type that all of that down just to pin point little technical specificities in a video intended for beginners.

    • @secrus
      @secrus 3 роки тому +1

      @@TheIsraelMendoza I am not hating, I am against misinformation. It doesn't matter that the video is for beginners. There is difference between simplifing stuff for beginners and misinformation.

    • @secrus
      @secrus 3 роки тому

      @@thedrunknmunky6571 just in my opinion, C++ has a lot of good libraries, the problem is, there is no general repository of them (like Python has PyPI). Also IMO C++ progress is being slowed by the fact ISO comittee keeps every version backwards compatible back to 80s and 90s. When it comes to low level langauge like C, look at Rust, it starts to take of even in embedded (although C is still leading that industry). From what I've heard, Julia is more like Python, but faster.

    • @secrus
      @secrus 3 роки тому

      @@neeronb I am defending Python since I like this language and I hate when people spread misinformation about it (mostly first point of my list). While you are right, that some of it might be hard to understand for beginners, I stand my point that simplification for beginners is not the same as misinformation and mistakes. It just can't be. I know that programming is now being spread for everyone to learn, but it is still science. It has basis in engineering, maths and physics. People need to be aware of that. The cancerous amount of programmers scared of learning some basic assembler or even pointers in C is growing. Let me compare it to cars. You don't need to know how engine is built and how it works, to drive a car, but you need to know stuff like changing oil, pumping tires and what type of gas you put in it...

  • @storypur
    @storypur 3 роки тому

    Is Lenovo legion 5 pro good for android and web development purposes?
    Processor and memory features -
    • 11th generation, core i7
    • 16GB RAM, 1TB SSD
    • 6GB graphic/ NVIDIA GeForce RTX 3060
    Or I should go for MacBook Air or Pro m1
    With 16GB unified memory and 1TB SSD...?

    • @zula01
      @zula01 3 роки тому +1

      Bro what!!! Go get ur lenovo bro forget that macbook😂😂

  • @tommyo2172
    @tommyo2172 3 роки тому

    kalle, do you use vim as your everyday text editor now?? or do you still use VS Code sometimes??

  • @christopherprobst-ranly6284
    @christopherprobst-ranly6284 2 роки тому

    Python itself is not slow, it cannot even be measured in slow or fast. It's a lang spec. The ref impl. called CPython has the runtime characteristics that you described. PyPy is another one with different characteristics. But yes, natively compiled Go or C will always be faster, no matter what. But the difference becomes less of an issue with JITs.

  • @cgme7076
    @cgme7076 3 роки тому +9

    People that think Python is “slow” clearly don’t understand how Python works.
    If you’re reading this, please think of why Python is commonly used for AI. It’s used for AI because Python is used as an intermediary between the programmer and the underlying C libraries the code is written in.
    It’s unfortunate that many programmers don’t even understand this.
    Python is “slower” only dependent on what you’re using it for and what you’re using it with.
    If you’re creating algorithms in Python then it’s slower. If you’re calling libraries that are written in C then Python is “faster”.

    • @ArjanvanVught
      @ArjanvanVught 3 роки тому +7

      Python is just slow and I do understand how Python works ;-) Native C/C++ compiled applications are simply faster.
      Relaxed syntax vs type safety in C++.

    • @Avengerie
      @Avengerie 3 роки тому +2

      Hell, even Java is faster than Python. But as you said, it is a very readable glue language with lots of libraries.

    • @gigantycznejabko9362
      @gigantycznejabko9362 3 роки тому

      Not faster, only slightly slower.

    • @joeg4609
      @joeg4609 2 роки тому

      yeah we get that. but then node id just better. javascript is easy to learn and more flexible to type so it’s just better objectively. you can ship data to C libs faster nbd it’s just better

  • @Greguk444
    @Greguk444 3 роки тому

    Thank you. Very interesting video.

  • @beuteltigre9511
    @beuteltigre9511 3 роки тому

    Thx for the content 🔥🔥

  • @thatsayon
    @thatsayon 3 роки тому

    Love from Bangladesh

  • @SourabhDesaiBrief
    @SourabhDesaiBrief 3 роки тому

    Nicely done, will you please explain 'Go' in same context?

  • @sephirot7581
    @sephirot7581 3 роки тому +5

    At 4:26 : Javascript is a visual language?
    If you search up for this, you find nothing because its just wrong. Javascript has also oop concepts. You comparing a programming paradigm with a nonsense word in this context.
    And overall the explanation about the difference between python and c is not good. You missing an important point, which is the biggest difference: Runtime. At the point where you was talking about virtual environment (which is also not correct in terms to runtime), i think you meant a Runtime. Im missing the point that the python code is interpreted in an interpreter at runtime and convert the interpretation to system calls. The explanation about type hinting has nothing to do with a native language or interpreted one. If you look at c or c++, you have also the keyword 'auto' which allows you to enable type interfering. In my opinion the video is missing some important points and mixed concepts which are not related to the topic and i think, you are not complete sure about the difference between the languages which you showed us.

  • @CodeDisease
    @CodeDisease 3 роки тому +2

    i can count numbers on my fingers faster than python

  • @willinton06
    @willinton06 3 роки тому +1

    Simple, they don’t know better

  • @izix9874
    @izix9874 3 роки тому +1

    Your channel inspire me to use more linux and do more programming 😂🤦🏽‍♂️

  • @komba2675
    @komba2675 3 роки тому

    anybody knows what distro Kalle is using at around 1:36?

  • @this_is_mac
    @this_is_mac 3 роки тому

    - how is python more flexible than C
    - what is a beginner friendly language
    - is C high level language

    • @asandax6
      @asandax6 3 роки тому

      Is Multi-level as it is both High and Low level. You can make Full fictioning apps with C as well bootloaders and kernels.

  • @expatcentral
    @expatcentral 2 роки тому

    I wonder what would happen to the TIOBE index if they took out all of those in Uni

  • @aymaanahamed2781
    @aymaanahamed2781 3 роки тому

    Which colour scheme do you use for vs code please..

  • @ACodingWoof
    @ACodingWoof 3 роки тому +1

    Very interesting video, I suggest you keep making videos of this type (like why lanuage, master langauge) :D
    Such a precise explanation!

  • @SoftwareEngineerMK
    @SoftwareEngineerMK 3 роки тому

    Is there any tool, that converts your python or JS code to machine language.

  • @peaklander1
    @peaklander1 3 роки тому

    Tie your hair a bit loose. You could damage or even permanently lose your hair if it's too tight.

  • @chamamemestre
    @chamamemestre 3 роки тому +4

    Kalle: "Even though Python is quite slow".
    Programmers across the world: "How dare you!"

  • @Randoomness
    @Randoomness 3 роки тому

    What is the problem in creating a language like python that is easy to understand, that can be as fast as C? why this haven't been done yet?

  • @jordixboy
    @jordixboy 3 роки тому

    It's not slow, all depends, saying that Python is slow is also saying that all interpreted languages are slow, which they are not.

  • @oliverreviews8496
    @oliverreviews8496 2 роки тому

    Myeah, don't agree that Python is intepreted language. I mean of course it is, but not for 100%, it still has come compilation.
    1. Compile to intermediate lang (byte code) e.g. files with ending *.pyc
    2. Interpret the written code line by line
    That's how it works with python
    btw That's one of the reason why Python has strong type system (to compare with JS, who doesn't)

  • @ReubenRiser
    @ReubenRiser 18 днів тому

    C runs Python. It is the original. It's like asking Mickey Mouse to help you out of a dangerous situation when Chuck Norris is available.

  • @mohammedgoder
    @mohammedgoder 3 роки тому

    This is why Microsoft Word takes 5+ seconds to load up on modern machines

  • @kerboplaytv8744
    @kerboplaytv8744 3 роки тому

    Honestly, sometimes I don't like this "relaxed" syntax and dynamic typeing (dynamic typeing is especially bad when consuming js APIs).

  • @harishsai8471
    @harishsai8471 3 роки тому

    I don't have knowledge of coding can I star learning for my career plz replay

  • @JLarky
    @JLarky 3 роки тому +7

    You almost tricked me into believing that you understand what you are talking about :)

  • @mateuszjaworski2974
    @mateuszjaworski2974 3 роки тому

    I would say that speed of scripts is often overrated. In real life, If you want to speed up your work with programming it doesn't matter if your script runs 5 or 10 sec, even difference of 5 minutes and 1 minute is offten to miss, or even a higher. And it's pretty hard to write a code that runs more than 10-15 minutes.

  • @TheMegaMrMe
    @TheMegaMrMe 3 роки тому

    at 06:50 you argue that python is an interpreted language because 10/3 == 3.333
    this is not correct.
    a typed language is not the same as an intepreted language. Python is both loosly typed and interpreted, yes, but you are mixing the 2 in your argument.

  • @yevheniibatiievskyi
    @yevheniibatiievskyi 3 роки тому

    Because it is non verbose programming language. And it's easy to use in terms of immeasurable amount of libraries for all problem fields.

  • @JR-hh8js
    @JR-hh8js 3 роки тому +1

    I’ve been trying to learn programming. I’m struggling so much :////

  • @unknownman5296
    @unknownman5296 3 роки тому

    YES THAT"S RIGHT !!! PYTHON IS THE BEST