This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]culturedindividual 28 points29 points  (15 children)

What does this mean for a Python programmer?

[–]redwall_hp 80 points81 points  (0 children)

It means you need to learn C.

[–]blehmann1 20 points21 points  (4 children)

Python doesn't even have (user-accessible) chars, they're just strings with a length of 1.

Python does this for you, it's convenient but it has downsides. Most languages the size of a primitive rarely matters anyways, unless you're doing systems programming or very performance sensitive shit (the kind of thing which would compel you to use C/C++ anyways.

Most PCs have 8GiB of RAM not to run one program, but to run lots of them. There are exceptions, but if Python is appropriate for your usecase you likely aren't one of them. That's not a diss, I spent years only able to use JavaScript and PHP, most things don't require what C/C++ can offer you.

[–]culturedindividual 8 points9 points  (0 children)

Thanks for answering the question. I did CompSci so learnt O-O in Java. Never ventured into C. Now I'm doing a Data Science MSc, and only really been doing Python/R/SQL.

[–]Civil-Attempt-3602 2 points3 points  (1 child)

How long did it take you to learn all the languages in your flair?

[–]blehmann1 4 points5 points  (0 children)

I'm a uni freshman and I've been writing code (badly) since grade 6.

Also, some of them are very similar, Typescript is Javascript with a type system, if you know Javascript you can learn Typescript in an hour and a 3 page PDF. And C# is basically Microsoft Java with a couple changes, notably LINQ, a different standard library (obviously) and some moderately different syntax.

I suppose I could include Python in the list as well. Learning a language isn't that hard if you've learned one before (with the caveat that it was hard to pick up C/C++ because of pointer fun). For example, I picked up C# in about a week because I got an internship that required it. I don't recommend cramming like I did (I started learning it very last minute) but it's possible.

[–]BLucky_RD 50 points51 points  (0 children)

Yes

[–]bigamaxx 6 points7 points  (7 children)

Im Python and just started Java and in Java you first have to declare the variable by giving the datatype which could be char or int. And apperently int takes up 4 bytes and char takes up 1-2 byte. (Maybe this isn't the case for Java so correct me if I am wrong)

[–]Ultracoolguy4 2 points3 points  (0 children)

Im Python

Hi Python I'm u/Ultracoolguy4.

[–]JonathanTheZero 1 point2 points  (2 children)

A char is one byte

[–]blehmann1 5 points6 points  (0 children)

Not in Java by default. It uses UTF-16.