ShardPhoenix comments on Open Thread: What are your important insights or aha! moments? - Less Wrong

16 Post author: Emile 09 November 2014 10:56PM

You are viewing a comment permalink. View the original post to see all comments and the full post content.

Comments (61)

You are viewing a single comment's thread. Show more comments above.

Comment author: ShardPhoenix 10 November 2014 11:05:26AM 3 points [-]

I had an analogous experience when learning programming for the first time related to the return type of a function - that if you have a function like "int myFunction()" it in some sense "is" an integer, and so the function call can be substituted anywhere that you could use a literal integer (like 3).

Of course it's not quite that simple in most programming languages since impure functions can have side effects that have nothing to do with the return value, but it was still a helpful realization.