this post was submitted on 20 Jul 2024
123 points (96.9% liked)

Programming

17479 readers
222 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 10 points 4 months ago (29 children)

I'm curious why you think Python is unsuitable. Both of my kids picked up Python pretty easily.

[–] SmartmanApps 18 points 4 months ago (28 children)
  • object-oriented (this is their FIRST proper programming language - they don't even know how to write loops yet and you want us to teach them OOP at the same time?! And as it turns out, I had one student who literally could NOT work out how to use a loop - kept writing 20 variables for 20 iterations. i.e. her variables never varied!)
  • variables are weakly-typed (use it for anything, whether it's what you first used it for or not, Python doesn't care)
  • indentation has to be exact (i.e. no brackets, just exact indentation). I had one student whose program wasn't working, and it even took ME a while to find what was wrong with it (a missing space).

I think there was more, but that's what I remember off the top of my head. If it was up to me then I would've used Pascal - that's what it's designed for! But at least C# has strongly-typed variables, and doesn't care about your indentation (and unfortunately there was no non-OOP language choice available - I'm not sure how this got in the curriculum when every teacher knows you only teach one concept at a time). As I said, many other teachers felt the same way, but couldn't get it past their school admin's.

[–] [email protected] 3 points 4 months ago (3 children)

You can use types in Python and your tools will generate warnings

def something(a: int) -> int: return "potato"

will turn yellow in an IDE more advanced that notepad.

Most editors will also show a red line where the indentation is wrong.

[–] SmartmanApps 4 points 4 months ago (1 children)

Most editors

Same thing still applies - you need to get it past the school admin gatekeeper.

[–] [email protected] 3 points 4 months ago (1 children)

If you're writing any language in like notepad, you're going to have a bad time. I accept your point that school administration may be making questionable choices about what software is installed, but that's not a problem unique to python.

[–] SmartmanApps 3 points 4 months ago

that’s not a problem unique to python

No, but it's a bigger problem for C# than is is for Python (though this is changing now), so all the U.K.-based schools were teaching Python, rather than the more-appropriate C#. That was my original point - that's the dumb reason I had to learn Python, school admin's wanted the lower overhead of the worse language.

load more comments (1 replies)
load more comments (25 replies)
load more comments (25 replies)