Console? good, GUI? good, game dev? use Godot engine with its similar language Gdscript, but what else? Ive been seeing AI, Data Science stuff, but whats the point if ita slow?

  • Chais@sh.itjust.works
    link
    fedilink
    arrow-up
    6
    ·
    2 hours ago

    Assuming this is a genuine question and not just trolling.
    Python’s main feature, IMO, is that it’s easy to pick up. You don’t need to remember to put a semicolon after nearly every line, so you don’t need to remember which lines don’t need it. Basically you only need to remember to put a colon before an indented block.
    Thanks to significant whitespace even bad code will be moderately legible.
    Control flow and loops are basically written in plain English: for i in range (17): as opposed to e.g. for (int i=0; i<17; i++) {.
    This all reduces the mental load and thus leaves you with more capacity to focus on the task you’re trying to solve.
    It’s a great language to give to your mathematicians, data scientists and other people with rudimentary programming knowledge at best.

    As for the performance: interpreted languages are inherently slower than compiled ones. You don’t get a speed boost from first asking a separate program to translate the next line of code into a machine readable format before executing it. Just like you don’t get a speed boost from executing all your cod in a virtual machine. Looking at you, Java.
    But you don’t use python for the compute-heavy tasks. You use it for the plumbing in between and outsource the computation to a native library with python bindings, like NumPy, Pandas, PyTorch, etc. Horses for courses.