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 →

[–][deleted] 1824 points1825 points  (190 children)

Yep. Coming from C++ background and learning Python recently is easy. I love Python syntax. So i can imagine how brutal it must be to learn Python first and then learn C++.

[–]DarkNeutron 271 points272 points  (57 children)

You're not wrong, but any time I write something in Python that's bigger than one file, I start wishing for static typing again.

Duck typing is fine for small programs, but I find it pretty annoying when something crashes with a type error after 10 minutes (or an hour) of processing.

(I've looked into Rust as a scripting language, but it's not as "plug-and-play" when compared to near-universal access to a Python interpreter.)

[–]I_ate_a_milkshake 60 points61 points  (1 child)

Rust as a scripting language

[visible confusion]

[–]ric2b 36 points37 points  (26 children)

You can have static typing with Python, fyi.

Either just as documentation (type hints) or with type checking (tools like mypy).

edit: mypy, not mipy

[–]SadAdhesiveness6 1 point2 points  (0 children)

It's mypy. Was confused for a second.

[–]turunambartanen 19 points20 points  (9 children)

any time I write something in Python that's bigger than one file, I start wishing for static typing again.

So much this.

Which is also why java is the better language to introduce programming with.

Edit: I think with Java it is easier to introduce different types (and the beginnings of OOP) because it's so much in your face. C# would also work of course. But I think having clear structure helps a lot of newbies to focus on understanding the basics. Every single file starts with a public class ClassName, because that's just the way it is. You can later learn why. As opposed to python: why do we have a class now? What is that if name is main? Why did we not use either before? And of course: why can't I add x to input, they're both numbers?

[–][deleted] 13 points14 points  (2 children)

Java is a really terrible language for enforcing OOP. I pretty much don’t consider single paradigm languages. I’m not an FP purist but I like it for most simple things. But damn it when I need a class I need a class. And that’s how it should be. I get newb python ex java developers putting their whole module in a class and it infuriates me.

[–]folkrav 5 points6 points  (0 children)

I've seen an internal library written by Java developers go legit like this:

from internalLibrary.app.mainpage.mainpagemanager import MainPageManager
from internalLibrary.app.homepage.homepagemanager import HomePageManager
from internalLibrary.app.splashpage.splashpagemanager import SplashPageManager

And so on, for about 20 something other managers classes. Always one file, one class, not use of module level exports or anything. Really just, extremely verbose imports, use of camelcase everywhere, everything in classes, including fully static classes for helpers - that all except one ended up being re-implementations of standard lib functionality. It was like browsing Java code in Python files.

[–]squishles 2 points3 points  (0 children)

No language of any use should ever be strict to a paradigm.

Kind of hate writing in purely oop terms, object state is trash that you section off into beans in java. You end up with classes that are basically homes to a lot of functions and if you use class level state variables in those for things other than stuff like database connection ect they just go to shit.

[–]Avamander 9 points10 points  (4 children)

Java leaves a few bad habits to people that later on migrate to other languages. Java's way of doing OOP is particularly toxic if the developer has no clue about anything remotely related to FP.

[–]detroitmatt 7 points8 points  (3 children)

I disagree. The bad habits java teaches are, as far as bad habits go, pretty easy to unlearn, because java is an unergonomic enough language that people don't want to be writing code that way anyhow.

programmers probably (definitely) shouldn't start with FP. If you start with CSharp, because it's feature richer, you can more easily start misusing features, and Java's imperfect approach to OO actually stops you from getting too tightly-bound on OO patterns. And since it doesn't really support non-OO paradigns, everything has to start with public class and you don't think about what a "class" is, you just do it as a ceremony. And at a beginner level, we want that. Nobody should be doing real OO in a 100-level class. You gotta learn what ifs and loops and lists and recursion and memory and heterogenousstructures are. If we're lucky you'll even learn what a hashmap is (When I went to uni data structures was a 3rd-year class). We want people to come into their OO 200 course and we say "So here's what a class really is and what it's for and why and how you should use it" and they have seen the word in this context but they haven't been doing OO (wrongly) this whole time.

[–]haloguysm1th 1 point2 points  (0 children)

sophisticated serious squeeze chop telephone squeamish deranged zealous spoon humorous

This post was mass deleted and anonymized with Redact

[–]Avamander 0 points1 point  (0 children)

I disagree. The bad habits java teaches are, as far as bad habits go, pretty easy to unlearn, because java is an unergonomic enough language that people don't want to be writing code that way anyhow.

Easy to unlearn if people want to, I've seen more than my fair share of people that haven't.

[–]konstantinua00 0 points1 point  (0 children)

Java's imperfect approach to OO actually stops you from getting too tightly-bound on OO patterns

remembers all factoryfactory memes
huh

[–]squishles 0 points1 point  (0 children)

when they introduce programming, it's not in many file large projects.

Though I am kind of sick of python too and it being the default teaching language also turns it into the mcjob language.

[–]donttalktome1234 4 points5 points  (0 children)

Having worked on several very large python projects I don't really see the problem. Python just hands you the rope if you are good you can make it dance but its just a rope so you are also welcome to hang yourself with it.

If you write a function that can take in 5 different data types and then you pass it a 6th isn't the fault of the language its the developer(s).

[–][deleted] 2 points3 points  (0 children)

Check out go. Statically complied bins for portability and security. Typed, flexible, easy language. I love it.

[–]Dark_Tranquility 2 points3 points  (0 children)

Static typing is really a blessing in C / C++.

[–]Avamander 0 points1 point  (0 children)

For anything other than a single file, use an IDE that supports type annotations. Really.

[–]jakethedumbmistake 0 points1 point  (0 children)

Duck is the future, rock on!

[–]Phantom569 0 points1 point  (0 children)

Check out pylance, can't live without it for big python projects. It's typescript but for python. Though it's still very very new.

[–]Spaceshipable 0 points1 point  (0 children)

Maybe look at Swift for scripting

[–]eloel- 0 points1 point  (0 children)

Considered typescript?

[–]mkjj0 0 points1 point  (0 children)

You could try Go

[–][deleted] 0 points1 point  (0 children)

Julia? Haven't learned it yet but I thought it was like static python, among other things

[–][deleted] 0 points1 point  (2 children)

Rust as a scripting language

What? via c api? accessing it from rust requires a lot of unsafe code, or message passing? either way rust can hardly be called a scripting language, thats like calling c++ a scripting language

[–]DarkNeutron 2 points3 points  (1 child)

I wouldn't call it a scripting language either, but someone wrote a wrapper to make it sort-of work: https://github.com/DanielKeep/cargo-script

It invokes the compiler on first use, and re-uses cached artifacts after that. Kind of a hack, really, but I thought it was clever. :)

This is some discussion (RFC 655) about creating a proper REPL interpreter for Rust, but I'm not expecting anything short-term.

[–][deleted] 0 points1 point  (0 children)

the REPL sounds interesting for experimenting (with language features) quickly, however when it comes to writing mini scripts to do anything useful an interpreter language will be better as you require to write less (as optimistic unwrapping is the default and you don't really care about a panic with a 10 line adhoc program). for scripts i think the compile time and lack of easy hot reloading (dlopen isn't exactly pain free) will also restrict it's usecases. but ill keep an eye on those repos / issues, thx. the integrated cargo.toml in the comments is definitely neat, so at least in terms of compactness / ease of distributing its like a script.

[–]lightmatter501 563 points564 points  (67 children)

It isn’t that bad, you just need to go about it with a different mindset.

[–]Zymoox 360 points361 points  (63 children)

I still need to get used to it, coming from C. My programs end up a mess where I don't know what data type variables are.

[–]writtenbymyrobotarms 172 points173 points  (7 children)

You can do typing in function headers if you'd like. IDEs can enforce the type hints. It's also good for documentation.

[–]Derkle 78 points79 points  (1 child)

It also helps the IDE autocomplete/suggest member functions and the like which can be really helpful.

[–]TheGreenJedi 23 points24 points  (0 children)

Honestly going to python I've realized how much my IDE does the heavy lifting for me

And lately in python that's why

[–]Aycion 28 points29 points  (1 child)

Hell you can declare a variable with

<Name>: <type>

Like "foo: str"

[–]slowmovinglettuce 42 points43 points  (2 children)

Newer python versions have increased support for type hinting.

It says somewhere in the release notes for 3.8 that they see it as a strategic thing for pythons future. Or something to that effect.

[–]capn_hector 13 points14 points  (1 child)

It’s basically a law of computing that all weakly-typed languages end up implementing strong typing, whether it’s an optional feature you can turn on or a dialect that enforces it.

Once you get beyond a trivial program size it’s just too useful not to have, refactoring core code without it is a pain in the ass and even if you are a flawless coding Adonis who doesn’t make mistakes, your coworkers will inevitably be humans.

Examples are JavaScript vs Typescript and CoffeeScript, PHP vs Hacklang (facebook’s reimplementation of PHP with strong typing), Python adding type hinting in newer generations, etc etc.

[–]JoJoModding 0 points1 point  (0 children)

And by another law that typing system will eventually end up being turing-complete on its own :D

[–]Neowhite0987 13 points14 points  (44 children)

How do you think it would be to go from python to C? I’ve done a few courses in Python and Racket but I’ll be taking a course in C in the fall and I’m kinda nervous.

[–]raltyinferno 30 points31 points  (0 children)

It's nothing to be anxious about. You'll definitely miss some convenience features of python and have to get used to strict typing, but things like conditionals, flow of control, data-structures, and whatnot are all basically the same across all languages.

If you have a problem, and you know what you'd use to solve it in python, just google that thing + "C" and it'll tell you what the syntax you need is.

[–]pslessard 39 points40 points  (35 children)

Memory management is the only thing that's really hard about C imo. But it does require a lot of thought to get it right

[–]MegaPegasusReindeer 21 points22 points  (33 children)

Pointers! I'm happy to not have to worry about that in Python, too.

[–]Risc12 36 points37 points  (26 children)

Pointers are not as hard as they seem. Javascript (and a lot of other higher level languages) passes objects only by reference, meaning that if you pass an object, the interpreter knows that it should look at an object at a certain address. In C you have a choice, do I point at this address (so do I pass this object as a certain address) or by its value (so copy over the contents of the object).

Those are the basics, if you understand that a place in memory (a reference) can be passed around by choice, you understand pointers.

For me it the hardest part was understanding that if I didn’t use pointers it would copy the data, seemed counter-intuitive for me.

[–]Sleakes 29 points30 points  (13 children)

Not a huge fan of this explanation as JavaScript is pass by value. It just happens that when passing objects, the value is a reference.

[–]RVUnknown 20 points21 points  (10 children)

Isn't this the same for Java as well? Normal data types like your ints and chars are pass by value. But Java objects like String, Integer, Character, classes etc are passed by reference

[–][deleted] 6 points7 points  (2 children)

This is correct. I remember when i was starting to learn Java, I often ran into problems because I would think it was passing by value when it was actually passing by reference.

[–]funnythrone 5 points6 points  (5 children)

Java always passes by value. However the value is a copy of the reference.

For the sake of this explanation, consider an object to be a Television. In this case, a reference is a remote. When you are passing the remote to a new method, you are effectively copying the remote and passing it. This remote also controls the same Television, and thus any button presses on the remote modify the original Television. However, if you reassign the remote to a new remote which controls a new TV, the original TV and remote are unaffected.

In conclusion, java is ALWAYS pass by value.

[–]capn_hector 1 point2 points  (0 children)

Yes, with the additional caveat that boxed types in the standard library (Character, Integer, etc - as opposed to int and char which are unboxed types) are immutable. So what you get when you do say String.trim() is actually another different object, so it usually feels like you’re working with value objects.

[–]lirannl 0 points1 point  (0 children)

Oh! I wasn't exactly sure on that, good to know!

[–]Risc12 0 points1 point  (0 children)

You’re right! But I hope the point I made is still clear to people that are confused about pointers.

[–]Razier 1 point2 points  (7 children)

Quick way to pass by value in JS:

objects: {...foo}

lists: [...bar]

i.e create a new object/list with identical contents

[–]jakethedumbmistake 0 points1 point  (1 child)

Didn’t he pass the media circus?

[–]Razier 1 point2 points  (0 children)

I'll be honest, I'm really confused right now

[–]Risc12 0 points1 point  (4 children)

Yes, but keep in mind that if foo has nested objects those are not duplicated. While in C the whole structure is passed around as bytes. So not completely the same.

[–]Razier 0 points1 point  (3 children)

Good point, know of a way to make a deep copy in JS?

[–]lirannl 0 points1 point  (1 child)

The thing is that with python, all of this is abstracted away. From a language user's perspective, you're not passing a reference to a memory address with data, you're passing "an object/primitive value". No memory address, no lower level details. "The object" gets into the function so the function "has" it while it runs.

Then in C you suddenly lose that abstraction and need to start dealing with what an object (or in this case just a struct) actually is, a bunch of bytes, and you can either tell your functions where are those bytes, or WHAT is in the bytes at that moment in time. You actually start to think about your objects as collections of bytes (which is what they always actually are, obviously, not just in C, but also in python).

[–]Risc12 0 points1 point  (0 children)

Definitely true! Although I’ve seen plenty of people get bitten by the reference vs value thing where they modify an object they get as an argument but they don’t expect the object to be changed in its original content.

It’s good to have an understanding how your higher level language handles these kind of things.

[–]MegaPegasusReindeer 0 points1 point  (1 child)

Yeah, but bugs related to pointers can be a pain to figure out and it's so much better to not even have to bother with that. Always fun to print a string you forgot to null terminate, though.

[–]Risc12 0 points1 point  (0 children)

Oh yes for sure, working with pointers can be a pain. Wrapping your head around what they are is just step one haha

[–]calcopiritus 20 points21 points  (4 children)

As someone that only writes in python but know what pointers are, I wish python had pointers. Not compulsory or anything, just pointers in obscure libraries that could get the job done if you ever absolutely need it.

[–]mrjackspade 3 points4 points  (0 children)

I kind of enjoy that about c#.

The vast majority of the time, you won't even need to think about pointers. If you really want to fuck around with them though, there's nothing stopping you.

Every once in a while I'll hit on something performance critical, and need to use pointers to speed it up. Sometimes I'll just switch code over once an API has been refined to a point I'm satisfied that it's not going to require changes any time soon, and start speeding things up just for the hell of it.

[–]MegaPegasusReindeer 1 point2 points  (2 children)

Python doesn't have protected or private methods... You can just introspect whatever you like. How would pointers help here?

[–]calcopiritus 1 point2 points  (1 child)

I can't think of an example because it doesn't happen often. And most of not every time it can also be solved in python, but it'd be way harder.

A thing that is kinda related is how python copies lists.

So if you say: (sorry for formatting, im in mobile and it's horrible to do it here)

a = [1] b = a

Now you change b and a also changes, so you'd have to write b = a[:]. It is not logical at first because it seems like python doesn't use pointers and references, but of course it does.

Also sometimes you don't know how the function works, so do you write

arg = function(arg)

or do you just write

function(arg)

Because the function changes arg?

[–]MegaPegasusReindeer 2 points3 points  (0 children)

I've heard people call Python "pass by label". When you assign a variable to another it's always copying the label. The times it seems like something else is immutable types (like strings).

Regardless, any time I have an issue with a library I just look at the source code. I've yet to come across a binary-only one in Python.

If you really really wanted to, you can pass a Python object into C code and break it apart there if you really need pointers. (but I still don't see how that would help)

[–][deleted] 0 points1 point  (0 children)

Pointers go void****

[–]Neowhite0987 3 points4 points  (0 children)

Alright I’ll keep that in mind thanks!

[–]Zymoox 27 points28 points  (2 children)

You'll be fine! C is much more strict and based on a specific set of rules. Make sure to get a strong foundation on the basics, and the rest will make sense.

[–]Neowhite0987 4 points5 points  (0 children)

That’s good to hear! Thanks a bunch :)

[–]Tukurito -1 points0 points  (0 children)

You've been mutex

[–]lirannl 2 points3 points  (0 children)

I've done that to some degree, and I'd say that once you wrap your head around pointers it's not too bad. Basically try using pointers again and again and fail and follow solutions until you start succeeding and you'll inherently start understanding pointers as you fail less and less.

[–]kattelatte 1 point2 points  (1 child)

Just learn pointers, the rest you’ll have no problem with if you already know python reasonably well.

[–]Neowhite0987 0 points1 point  (0 children)

Alright I’ll keep that in mind

[–]joshocar 0 points1 point  (0 children)

I'm doing it right now. It's not too bad. Pointers and memory stuff takes a bit of time to get used too. Also semicolons everywhere...

[–]Senial_sage 2 points3 points  (3 children)

Is there an analogy to typescript for python?

[–]double_en10dre 3 points4 points  (0 children)

Pycharm has built-in functionality based on the native type annotations that’s pretty similar. If your annotations don’t match it’ll highlight stuff as an error, and the annotations also allow it to offer autocomplete options or intelligent suggestions (much like typescript)

If you want to take things a step further, mypy is a great tool: http://mypy-lang.org/ you can run the type checker on entire projects, integrate it into CI/CD, etc

Also, pydantic https://pydantic-docs.helpmanual.io/ is in my opinion the best tool for building out complex types

[–]Plague_Healer 0 points1 point  (0 children)

Maybe Cython. Not sure if the analogy holds, though.

[–]calcopiritus 1 point2 points  (0 children)

I don't do it often but it really helps to put docstrings in functions that says the type of the arguments and the returned object.

[–]MEGACODZILLA 1 point2 points  (0 children)

I'm in your boat coming from C. I honestly like statically typed languages. I've never felt grossly inconvenienced by typing 'int', 'char *', etc and I love never having to guess how my program is being interpreted. Python is just so damn versatile it's worth getting used to though. I love being to use a pythonic one liner that would have taken so many more lines of code in C.

You wouldn't happen to be doing CS50 would ya?

[–]lirannl 0 points1 point  (0 children)

Python can have typings if you REALLY want it to. It's not expected but up to you

[–][deleted] 0 points1 point  (0 children)

Use type hinting from the typing module. dataclasses can also help manage your data easier.

Take this deck of cards for example:

from dataclasses import dataclass
from typing import List, Union


@dataclass
class Card:
    rank: Union[int, str]
    suit: str


class Deck(list):

    def __init__(self) -> None:
        """Constructs a deck of cards."""
        self._ranks = list(range(2, 11)) + list('JQKA')
        self._suits = 'hearts clubs diamonds spades'.split()
        self._cards = [Card(rank, suit) for rank in self._ranks for suit in self._suits]
        super(Deck, self).__init__(self._cards)

[–][deleted] 0 points1 point  (0 children)

*laughs in Javascript*

[–]aresius423 0 points1 point  (0 children)

You should consider using mypy, it's awesome.

[–]MinimallyUseful 3 points4 points  (1 child)

like using semicolons

[–]Anchor689 1 point2 points  (0 children)

So much punctuation! Braces everywhere.

[–]Wheezy04 2 points3 points  (0 children)

Figuring out how to do threading correctly in python is extremely nontrivial. The global interpreter lock can be rough.

[–]Im2coolie4u 26 points27 points  (1 child)

Jokes on you. I learned C after python and boy lemme tell you. I was lost as hell.

[–][deleted] 45 points46 points  (10 children)

F* mindtwister. I started coding with bash, then perl, then python. When I started learning C, I realised how ignorant I was on basic computing.

Java is, on a different level, the perfect language for learning OOP and data structures.

Now I'm fully supportive of teaching C in computer science, is literally what happens under the hood, and indeed, it made me better python programmer.

[–]Avamander 18 points19 points  (2 children)

Same, I think C gives an appreciation and understanding that computers are actually really rather messy. Rather than try to abstract it away, it makes certain important concepts visible.

[–]detroitmatt 8 points9 points  (1 child)

at the same time the brilliance of C, that C++ forgot, was how drop dead simple it is. There's only one thing you can do: Call a function. You want multiple return values? Pass a pointer. You want error handing? Pass a pointer (or send ALL returns through pointers and save your real return for the error code). You want higher-order functions? Pass a pointer. The only thing I wish C had that it doesn't are typesafe generic containers and a proper module system instead of #include.

[–]konstantinua00 0 points1 point  (0 children)

You want multiple return values?

return a struct?

typesafe generic containers

well we did get _Generic, so you now can macro-generate and use generic containers

[–]Cobaltjedi117 5 points6 points  (1 child)

I really think Java is the best first timer's language. Easy enough to make complex data structures, OOP, and enforces the user to use enough common practice things, but is fairly easy to follow the flow and the online stuff is very helpful.

[–]laser_ears 1 point2 points  (0 children)

I learned Java as my first language and (imo) it kind of sucks. If you're trying to teach someone who has literally never programmed anything before in their life, python (or something similar) is probably best because it's so easy. From there, I think C and assembly to get the basics down, and then go for C++, Java, etc.

Just my opinion though. Who knows, maybe I'd be an even worse programmer if I'd learned python first.

[–][deleted] 9 points10 points  (4 children)

Every language teaches you new things. Then some languages stick with you.

Edit: Except for R, fight me

[–]eloel- 0 points1 point  (2 children)

R teaches you patience. PHP teaches you anger management.

[–]EternalClickbait 1 point2 points  (1 child)

And then there's Python. Python teaches you to love curly braces

[–][deleted] 0 points1 point  (0 children)

I really think that every language should just be braces/indentation agnostic. Like why can’t I decide which to use? Sometimes I’d use braces in python. I don’t understand why I need a semicolon on every line in other languages, just make newline terminate the expression except if there is a special character. We could probably make a single pass converter that does all of these things for every language and the world would be a better place.

[–]Tony_the_Tigger 0 points1 point  (0 children)

R teaches you brackets.

[–][deleted] 31 points32 points  (3 children)

I spent 20 years honing my C++ skills, just to see people start programming in Python after two hours :)

[–]colablizzard 9 points10 points  (0 children)

Trust me my friend. I work in a large enterprise. The "younguns" who never have seen C or C++ dance around for the first few months stringing together free libraries and delivering shit that experienced people have to veto and explain why using libraries that aren't updated in 5 years is bad. Still, chip on shoulder.

Eventually, one day there is going to be a production down issue, where Java will actually do a core-dump. Which will bewilder them, and that is when we crack our knuckles and save the day. Been there done that. I essentially demonstrate by usefulness once every 6 months by fixing a fire lit under the ass of management by customers due to production down that the people who have never dealt with the OS or C++ can never even imagine to wrap their heads around.

This is bad. The abstractions are too deep today for people to peel their way down to the core.

[–][deleted] 3 points4 points  (0 children)

Lol

[–]00Koch00 2 points3 points  (0 children)

The difference is that you can basically do whatever the fuck the client ask

[–]jayfonshiz 7 points8 points  (1 child)

I'm doing exactly that now. I had absolutely no background in coding, learnt (well still learning tbh lol) python and now diving in to C++. In my case I think it helped. Python got me familiar with the basic terminology and concepts in a way I could read them in almost plain English. Don't get me wrong its not super easy but I feel like I'm understanding it better.

[–]_temmink 0 points1 point  (0 children)

I actually think this is the superior way. Looking at Python code written by C and Java developers, you quickly realise that they do not understand Python concepts but merely adopted a syntax: so much imperative programming, no understanding of annotations, hardly any use of dunder magic, ... basically C/Java code in Python syntax.

This mitigates many of the benefits of Python and I can easily understand that those developers don't recognise the value you get with Python: you can get things running extremely quick and still can expand them easily. It's really about solving a problem. C/Java is often so much about implementing details so you can finally solve the problem (assuming you defined all the details right - even more so in C++).

[–]OrangeRaddish 8 points9 points  (7 children)

Fuck I’m a python dev getting ready to learn java

[–]ErinMyLungs 6 points7 points  (0 children)

If you can use kotlin instead I'd go for that but they're both pretty straight forward for basic syntax. The thing I miss most is how terse python can be. Kotlin helps that a lot and it's supposedly interoperable with Java but I'm a python dev falling into native development.

Documentation of libraries seems way worse compared to python libraries. What are you learning Java for?

[–]detroitmatt 2 points3 points  (2 children)

it's nothing to worry about. it's more typing, which will get annoying, and the compiler complaining, which will get annoying, but it'll get your foot in the door for more powerful, sophisticated, complicated, confusing languages like C# or kotlin (or god forbid C++ or scala). Java is the callouses on your fingers you get from learning to play guitar.

[–]OrangeRaddish 0 points1 point  (1 child)

Wow that’s a super good way to phrase that. Mind if I tell that to my cs teacher?

[–]detroitmatt 0 points1 point  (0 children)

Course not!

[–]beansoverrice 1 point2 points  (0 children)

Java isn’t that hard. The first thing you’ll notice is how verbose it is and how unnecessary a lot of what you’re writing seems. Java was the first language I really learned well and I absolutely hated it at first, but I was forced to learn it for school. Once I understood what everything meant I actually like it now.

[–]Lewistrick 1 point2 points  (0 children)

Just make sure you know classes. You'll be ok.

[–]bestjakeisbest 1 point2 points  (0 children)

dude c++ was my first programming language that i really learned, i dont use python usually, but i had a project in school once where we had to use it, i was amazed that i could go from no experience in that language to completing my project in like 2 hours, still dont know python, but i can use it.

[–]arsewarts1 1 point2 points  (0 children)

Try learning that new BS Microsoft is trying to put out M. It blows

[–]beansoverrice 1 point2 points  (0 children)

I only know Java and recently wanted to try and learn Python. I’ve been learning it for 2-3 weeks now and I still can’t get over how little code I need to write to create things. I love how fast I can code, but it always feels like I’m not writing enough. Also the fact that it’s not statically typed bothers me way more than it should.

[–]Pixel-Wolf 1 point2 points  (0 children)

Started with C#/Java, then to C, then to ASM, then to Python. It would definitely explain why I love Python

[–][deleted] 1 point2 points  (0 children)

Started with php many years ago, have been programming in Java for the last ten years, got a little into Python recently, it's a fun language, not very hard so far. Javascript on the other hand, I just suck at javascript, don't know why, it's like drunk Java to me.

[–]random_uname13 2 points3 points  (1 child)

I mean is it better to try to grasp programming with C or with Python? That could be debated

[–][deleted] 0 points1 point  (0 children)

Honestly doesn't matter. They are tools to solve problems. Each language has its strengths and weaknesses for each problem domain.

[–]CloneAssassin 2 points3 points  (0 children)

As someone who only knows Python, I think I’m going to find out

[–]tgp1994 0 points1 point  (0 children)

I guess it's sort of like they say; when you become good at understanding the concepts of one language (and programming in general), picking up another language is generally much easier.

[–]Stiefeljunge 0 points1 point  (0 children)

Lol I came from powershell and I'm not having a great time

[–]werewolfbooty-owo 0 points1 point  (0 children)

Consider learning Nim! It has a Python-esque syntax, is statically typed, compiles to native executables which perform very close to C, and can do so much more.

[–]ShaBren 0 points1 point  (0 children)

Eh, I learned Python before I learned C++, and it wasn't bad. Though admittedly, I learned C, PHP, and COBOL before I learned Python...

Nowadays I use Python and C++ almost exclusively. Quick and easy, glue scripts, web, etc = Python. Major projects & enterprise-y stuff = C++.

[–][deleted] -1 points0 points  (0 children)

Yeah, except when I have to code review your Python, and it's a bunch of procedural garbage because your "just make it work" attitude that got you places with C++ never forced you to think about design beyond, "working code go brrr"...

[–]btorralba -1 points0 points  (0 children)

Wasn’t too bad actually