Skip to content

Instantly share code, notes, and snippets.

@weakish
Last active August 20, 2017 16:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save weakish/6483a3678a20ed8dc1a7993112995bbf to your computer and use it in GitHub Desktop.
Save weakish/6483a3678a20ed8dc1a7993112995bbf to your computer and use it in GitHub Desktop.
how to #learn #programming languages

How to learn programming language?

A language that doesn't affect the way you think about programming, is not worth knowing.

-- Alan Perlis

  • Focus on semantics, instead of syntax.

    For example, it really does not matter a lambda is expressed as lambda {|x| x + 1}, lambda do |x| x + 1 end or ->(x) {x + 1}, -> x {x + 1} in Ruby. Rather than focus on these syntax differences, you'd better focus on semantic differences: the differences among lambda, block, Proc.new, def and define_method.

  • Focus on concepts, instead of concrete details.

    For example, functions, closures, types, classes, objects, prototypes, structures, pointers, lazy-evolution, coroutines, callback. Once you understand them, you can learn new languages quickly.

  • Focus on good parts, instead of all parts.

    Usually you do not need to master every corners of a language. You'd better rather focus on good parts.

    Sometimes you even need to focus on good parts outside the language. Just like you can use vi mode in Emacs, you can borrow good parts from other language.

  • Modeling is an effective way of learning. Thus learning the implementation of the language is a good way.

    You can even implement the language yourself. To learn a language, you does not need a full implementation. Also you do not need to worry about performance. You can just implement a interrupter with basic and important concepts.

References

Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment