547
I like Python def (lemmy.world)
you are viewing a single comment's thread
view the rest of the comments
[-] relevants@feddit.de 5 points 1 year ago

Well, I think for a 9 year old it's fine. I think the stage where you would run into issues is when trying to get into "actual" software development, where the flexibility in scoping and typing afforded by Python can lead to some bad habits (e.g. overusing global/shared variables, declaring them from within functions, catching errors late instead of validating data first, ...)

I don't have a ton of experience with it but I think C# strikes a pretty good balance between strictness and beginner-friendliness. Modern Java isn't all that bad either, though it doesn't have very good options for fun things to build. But again, I don't think this necessarily applies to a child; I'm an educator at a university so both my target audience and point of reference are freshman compsci students.

[-] evranch@lemmy.ca 3 points 1 year ago

Thanks for your input, C# is a language I never really considered but it does sound like a good middle ground and possibility a good successor to Python for her. Very popular, powerful and a better approach to a "true OOP" language than Java IMO. Though as you state modern Java has come a long way from its origins.

overusing global/shared variables

I see you've been reviewing my Python code, lol. The structure of the language does lend itself to using globals as a shortcut when they shouldn't be... And as a primary embedded dev I will admit that I'm already a heavier user of globals than most. But I agree being able to declare global variables inside a function is pretty gross, as is the scoping/declaration issue where you can easily end up with global and local variables with the same name without even throwing a warning.

this post was submitted on 24 Sep 2023
547 points (100.0% liked)

Programmer Humor

32712 readers
1096 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS