Is there really any good reason to use C over Python?

Just because something is simple doesn't mean it's simple to a disadvantage. I've been writing Python for about 8 months now and I fail to see where it would be advantageous to un-abstract everything

If you're required to do something for the code to work then it's just redundant and you may as well make it that way by default

So you can manually manipulate pointers. The pointer itself doesn't do anything, that's just a method of accomplishing something. I don't even understand why anyone would want to do this

>speed
That doesn't make the language inherently good.
This issue is alleviated as soon as we find a way to make languages like Python precompiled.

Also other languages are just slower because most of the time we care about the negligible speed so little

I'd really like to learn C but it just feels like walking upstream. It's like building a house by manually chopping down trees and harvesting the iron to make the nails, there's tried and true methods of doing this from people that are better than me and I can't see any reason to do it myself

Python is slow, can't even make games with it.

I covered that

And you can make games (there's a very popular module) but not much beyond dinky phone games

Ada's existed for 30 years and is a relative to Python, syntax wise. Give it a shot.

You can inline assembly in C, which allows for actually huge performance increases using SIMD instructions
You can manage your own memory and lose padding or boxing by other languages
You can actually perform system calls if you want (though that might be supported by other languages)

Which language is the best if I want to do a private 2d side-scroller project with networking capabilities?

visual basic

If you want to write anything even remotely close to hardware or embedded. AKA real engineering

c'mon my dude, I just want something that's straightforward enough and relatively easy to develop on.

unity, so c#

C enthusiasts say that portability is a big pro, also if you are working with hardware people seem to use C, though I don't know why.

anything other than unity?
If it really is the best option then I'll do that, but I wonder if it's the best for 2d.

Python is very slow. Also you can't use it for everything, try programming a microcontroller in python for example

it is not, it is best only if you want to publish it in more than 1 device

that wouldn't be necessary, just Windows (Linux would be a plus) will suffice.
what would you recommend other than Unity, then? There's an XNA fork that I had some experience with, but it doesn't seem like it has good support.

>Is there really any good reason to use C over Python?
Python's dreadfully slow compared to C and C++
>>speed
>That doesn't make the language inherently good.
Maybe not, but it's a good reason to use C

>[speed] doesn't make the language inherently good.
You didn't ask about inherent "goodness", you asked for "reasons to use C over Python". Speed is a reason to use C over Python.

>This issue is alleviated as soon as we find a way to make languages like Python precompiled.
Your question says "Is there really any good reason to use C over Python?" not "Will there really any good reason to use C over Python in ten years time?".

>I can't see any reason to do it myself
Then maybe you don't need to learn or use it. Many people don't. It depends on your use case.

As for reasons to use it over Python?
Speed.
RAM conservation.
Direct OS access.
OS development.
Direct hardware access.
Embedded systems development.
Portability (sometimes).
Executable size (sometimes).

Python as a C/C++ wrapper.

This is the only answer you need.

well as e1 else said c/c++ if speed is needed (million objects on screen) otherwise pyGame is enough

python has huge incompatibility issues between versions and devs that refuse to embrace python 3.x

Theirs love engine, It uses Lua.

C++ and SDL2.
XNA is dead.
Or you can use unity if you want bulky "convenience" and splash logo.

There is also cocox2dx and libgdx(Java) but I personally prefer pure SDL2.

Depends on the use case obviously. You won't be writing kernel code or embedded in Python.

It's still a good idea to learn C, whether you will use it for practical applications or not, because even if you don't write C you will interact with many things written in C.

C is not a complex language. And you can use libraries in C, you don't have to build everything from scratch.

The big question is: why NOT learn something new? Even if I know I prefer C to Python, I still want to continue learning more about it to make sense and use of code other people write in Python.

>SDL and openGL bindings
>Memory pools to control your memory in a macro-level
>Real, advanced taking system
>System language
Take your meme away, good sir.

>make languages like Python precompiled.
To a greater or lesser extent, this is impossible.

In Python you can't bake function addresses into the bytecode, because the code can overwrite functions at runtime.
In Python you can't bake property addresses into the bytecode either, because they can be added and removed at runtime.
Even if they couldn't be added and removed at runtime, you still wouldn't be able to tell what type was going to be present because the variables don't have types and so you still wouldn't be able to do.
Because you don't know what functions will be present at runtime, you also can't ever inline functions to reduce call/return overhead.
And those are just the ones I can think of off the top of my head.

Sure, you can compile such languages, indeed Python already does compile to bytecode when used as a library, but you will never be able to achieve speed anywhere near what you can with C/C++. The languages flexibility make it impossible.

No downsides now that our Google overlords allow you to compile python to go.

There are good reasons to use neither.
/thread

>That doesn't make the language inherently good.
The opposite however is true, full programming languages that can't be made fast are inherently bad - at least for anything facing a user.
>This issue is alleviated as soon as we find a way to make languages like Python precompiled.
It's called changing the semantics. What you have to do anyway if you want PyPy and Cython to create fast results beyond numeric benchmarks.

It is, if you want to create a new compiler, because you can basically ignore different supported number types - and there might be more, like stuff about easy exception support and calling conventions. But there are even microcontrollers that don't support all features of C.

All this means the language is portable, the code as a consequence not so much.

But, to put this straight, this is a moronic argument pro C. I'd rather go for a specialized system programming language for "rich" architectures like x86 and some ARMs and a specialized one for programming 8bit microshit.

The downside is that the result isn't fast and not always compatible. They only did this to get rid of Python 2.

Both Python and C are meme languages by this point. Why bother with either? Superior replacements came up a long time ago.

Compilers are better at optimization than humans, it can know the entire context of the binary while it's compiling and make optimizations based off that, it's unrealistic for a human to do the same

Such as?

Pretty based, too bad everyone's autistically stuck in their ways

>better than me
Why trust them? Learn for yourself m80

From the top of my head:
For C - C++, Rust and D
For Python - Rails, Nim, Lua

...

These and a couple of more.
Seriously, how is this even up to discussion /thread

stopped reading when you implied that python is simple, it is most definitely not in any way simple whatsoever
easy does NOT mean simple, it is simple to cut down a tree, it is not easy.
c is a very simple language that has decent consistency (not necessarily the best, but we are comparing it to a language that has 3 uses for colons, none for semicolons, uses its indentation as fucking syntax, and uses hundreds of methods stringed together to accomplish the same thing some function calls could with much less ambiguity and crassness)
i wrote a lecture on what programming languages were the best to teach college kids, and while i unfortunately no longer have it, maybe a fourth or so of it was about simplicity and why academics seem to confuse it often with elegance, ease of use, and being percieved as 'good' by a majority.
if you want a good programming language, you'd be foolish to pick python over c, regardless of memers who think you need oop to write anything of high complexity, and if you want a truly simple language, scheme is far simpler than python, it barely has looping constructs, you basically need to teach someone 3 concepts to program in it.
or, hell, if you want even simpler to a true fault, forth doesn't even need an abstract syntax tree.

also, as to your next point that i glanced at, speed DOES make a language inherently good, you cannot compile python, it is not made to be compiled, and compilation really doesnt have much to do with speed, considering luajit can beat go, java, and c in some edge benchmarks, the truth of the matter is that python isn't even made to be fast, all of its 'easy' abstractions obscure optimization and make it run slow by default, if you want python to be fast (or useful) at all, you need to leverage the fact that it is POPULAR (which does not mean it is good) to get other people's code. (usually c)

Name 5 profitable things that use python.