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
Angel Walker
Python is slow, can't even make games with it.
Joseph Perez
I covered that
And you can make games (there's a very popular module) but not much beyond dinky phone games
Jackson Wood
Ada's existed for 30 years and is a relative to Python, syntax wise. Give it a shot.
Carson White
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)
Juan Clark
Which language is the best if I want to do a private 2d side-scroller project with networking capabilities?
Asher Murphy
visual basic
Bentley Allen
If you want to write anything even remotely close to hardware or embedded. AKA real engineering
Grayson Rogers
c'mon my dude, I just want something that's straightforward enough and relatively easy to develop on.
Carter Rivera
unity, so c#
Ethan Jackson
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.
Ethan Adams
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.
David Lee
Python is very slow. Also you can't use it for everything, try programming a microcontroller in python for example
Samuel Williams
it is not, it is best only if you want to publish it in more than 1 device
Jackson Edwards
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.
Jordan Russell
>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
Dylan Peterson
>[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).
Nathan Nelson
Python as a C/C++ wrapper.
This is the only answer you need.
Carson Green
well as e1 else said c/c++ if speed is needed (million objects on screen) otherwise pyGame is enough
Kayden Perez
python has huge incompatibility issues between versions and devs that refuse to embrace python 3.x
Henry Turner
Theirs love engine, It uses Lua.
Wyatt Martinez
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.
Brody Cox
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.
Jayden Collins
>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.
Ryan Fisher
>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.
Easton Morris
No downsides now that our Google overlords allow you to compile python to go.
Nathaniel Nguyen
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.
Daniel Hughes
Both Python and C are meme languages by this point. Why bother with either? Superior replacements came up a long time ago.
Cooper Peterson
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
Carter Turner
Such as?
Blake Ross
Pretty based, too bad everyone's autistically stuck in their ways
Andrew Long
>better than me Why trust them? Learn for yourself m80
Michael Cook
From the top of my head: For C - C++, Rust and D For Python - Rails, Nim, Lua
Isaac Foster
...
Jose Bell
These and a couple of more. Seriously, how is this even up to discussion /thread
Lucas Campbell
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)