Hacker News new | past | comments | ask | show | jobs | submit login

I consider myself barely Python literate (I've modified maybe 5 python scripts in my life) but also managed 15/15. Most of the relevant core semantics are extremely common to dynamically typed scripting languages:

- Reference semantics for pretty much everything, except perhaps basic types such as integers - but those are generally "immutable" (e.g. no 5.add(6) mutating the "original object" in-place) making by-reference vs by-value moot.

- Arguments copy the reference, they do not alias the original reference.

- Mutating functions, if the return value isn't being used, are either being misused (e.g. the code has a bug) or mutate the original object in-place.

- Closures alias the same variables

This could be JavaScript, ActionScript, Ruby, Powershell, Squirrel, PHP, ... hell, even a lot of the compiled statically typed languages share similar semantics. I'd expect someone coming from, say, a pure C/C++ background to have some trouble though, which is perhaps the point you're getting at.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: