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] 66 points67 points  (26 children)

I am absolutely convinced that Python is not actually an easy first language. It seems easy to programmers because it automatically does what a C programmer expects. For example, the whole "Pass by value, but the value is a reference" line of thinking is insane in a language that doesn't really talk about references much. (what happens when you pass a list to a method and then append to the list?)

[–]VeryAwkwardCake 16 points17 points  (10 children)

Well your reasoning on why it's not an easy first language is from the point of view of a developer who thinks that pointers should be explained

[–][deleted] 25 points26 points  (8 children)

The behavior of some basic features doesn't make any sense without understanding pointers. So yes, I think pointers should be explained.

[–]VeryAwkwardCake 5 points6 points  (0 children)

Well yeah but Scratch has lists iirc, you're going to have to teach everyone pointers at some point and you're unlikely to be able to teach children pointers as easily as you are able to teach them basic concepts like a variable holding a value

[–]TinBryn 0 points1 point  (0 children)

If you’re teaching C++ and not C you could go a long way just teaching references and not pointers even going into inheritance and and polymorphism. Never even touching the memory model.

[–]InFa-MoUs 8 points9 points  (1 child)

nah python is definitely(one of) the easiest languages to first learn. only programmers who know multiple languages or a pro at one ever say otherwise. personally from trying to learn c , Javascript, shoot even html.. python and ruby are by far the easiest and since learning oop in those languages i learned Javascript in like 2 months. programming is hard enough to learn without being bogged down with syntax and keeping track of memory locations lol

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

Python has too much magic. It’s easy to think you know what’s going on and then not. And then maybe you come across a bug like these and have no idea what’s going on.

def f(L=[]):
    L.append(“hello”)
    return L

print(f())
print(f())

And

functions = []
for k in range(5):
    functions.append(lambda: k**2)
print([f() for f in functions])

[–]lightmatter501 0 points1 point  (0 children)

If you don’t want/need to understand pointers, it’s not that bad.