I just finished CS50x and C was the the fucking worst. Why do people use that shit? Python is a million times better

I just finished CS50x and C was the the fucking worst. Why do people use that shit? Python is a million times better

Attached: Python.svg.png (1200x1200, 101K)

Other urls found in this thread:

python.org/dev/peps/pep-0572/
twitter.com/NSFWRedditGif

Do you even memory manage?

Python cannot do everything. It's really slow.
That's thr reason we use C/C++.

Although Python is pretty good at small application level. Large application made with Python will be a disaster.

I hate dynamic typing

even better, it has duck typing. if it looks like a duck and quacks like a duck, according to python, it's a duck. after thirty minutes of use it becomes painfully obviously that python has never seen an actual duck.

> Thinking abstracted C is better and more versatile than C.

yikes

this

>Why do people use that shit?
So that you can write your Python scripts, Rajesh.

>thinking c is good

>thinking abstracted assembly is better amd more versatile than assembly
Wew.

>cs50x
top kek

it's a great course

Python 7th Dan Black Belt, coming through.

Attached: 1542603526448.png (500x693, 208K)

C is fine. String operations are annoying, but if you want to do anything on the side of optimization and solving without having the language hold your hand, it’s the best.

Python is fine too, but unless you want to use the ML/scipy/numpy libraries, C makes you a memory aware programmer at the end of the day. Most of the pain associated with C is being exposed to just how costly memory can be

Nobody uses that shit unless they are forced to for legacy projects. C is the FORTRAN of the 80s.

>Why do people use that shit?
Because it is significantly better in certain use cases, such as high performance computing...

This is why Python is so slow. Everything is a heap-allocated object. When you have an array of, say, of ints, they're not native ints, but an array of pointers to int objects. No cache locality whatsoever.

Python is good to get a quick working prototype of something running. But at the end of the day, you should be spending time moving that functionality into C for performance related reasons. It's pretty wild the difference in speed between C and python, it takes python maybe 1 full second to retrieve a html file, C does it in like a nanosecond

Python:
c = getchar()
while c != EOF:
...
c = getchar()
C:
while ((c = getchar()) != EOF) {
...
}
Pythonistas will defend this.

But you would literally never use this idiom in Python. So that isn't an argument.

What do you mean? Of course you wouldn't, because you can't. Or do you not understand what I'm pointing out? They finally added assignment expressions in 3.8: python.org/dev/peps/pep-0572/

Real languages have had this for since creation.

What he's saying is that since you're clearly ignorant of the language's idioms, you haven't learned the language beyond a superficial level and are therefore not qualified to make that comparison desu yo ne OwO

No, the idom is the point, you can't assign an expression in Python

If you're using the latest version of Python you can do this
while (c := getchar()) != EOF:
...

Exactly my point. Why has Python only added this now?

Python = 3.8:
if match1 := pattern1.match(data):
result = match1.group(1)
elif match2 := pattern2.match(data):
result = match2.group(2)
else:
result = None
Have fun rewriting your code or ignoring this feature to remain backwards compatible. Real languages have worked with form two since forever, but Python is only getting this feature in 2019. No post/pre increment/decrement either - perhaps that will come with 3.9. What a joke.

Sup fellow cs50 queer. It was a great class wasn't it?? I finished like a year ago and had no previous experience. I'm using it to take higher level courses now and hopefully get a master's. C was a huge bitch but it definitely forces you to get your head around memory and data structures. David J Malan is a master G.

Python is a script language for script kiddies
C is a programming language for software developers

isn't the python interpreter written in C?

Because they can.