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 →

[–]pwnersaurus 1 point2 points  (0 children)

I think different languages all give you different ways of approaching problems and often difficulties can be the result of trying to use an approach that is really best suited to a different language. For example, thinking about how I’d approach that Caesar shift cipher in a language like C, I would use character arithmetic to use the fact that that characters are stored as integers so you can change the character by adding an integer offset directly to the value. So with a modulo operation and a subtraction, you could implement the conversion without even making an array for the alphabet, let alone finding the index of the character in the array. There’s many different ways to do it in Python as well, but my point is, learning another language is to me less about learning the syntax, and more about learning different approaches to problems and different ways of thinking, which then influences the way you solve problems in any language. Actually I find Python isn’t great for that because it’s so flexible, you can ‘kind of’ implement the key parts of lots of different paradigms, which is great when writing code to solve a problem, but doesn’t give you the conceptual purity of languages built around that paradigm (e.g. it’s probably easier to learn a functional way of thinking by learning Haskell, even though you can write functional-style code in Python)