Tuesday, September 7, 2010

How Inception is like metaprogramming



The dreams-within-dreams concept from the movie Inception is being compared by programmers to a recursive function. A parallel exists between dreams-within-dreams and programs-within-programs. As you're watching the movie,especially in the later sequences,you are watching it on four and even five levels. The events that occur on each level have consequences for those levels below it. When the dreaming is over, the lower levels get to return the favor,having consequences on the levels above them by how they changed the dreamers themselves. To follow the movie you need to have an understanding of what is going on at each level. Similarly in metaprograaming, you need an awareness of what level you are operating on at any given time as well as some knowledge of when and how to mix in elements from other levels.
Metaprogramming is the writing of computer programs that write or manipulate other programs (or themselves) as their data, or that do part of the work at compile time that would otherwise be done at runtime. In many cases, this allows programmers to get more done in the same amount of time as they would take to write all the code manually, or it gives programs greater flexibility to efficiently handle new situations without recompilation.(Definition Source : wiki )
Study More.

Read more...

About This Blog

Well this blog is designed to express my views and be a part of the online community.When I first started it,I was the only one of the few to blog and read at the same time,and thus paid less attention to it.But nowadays,blogging is a fashion and who doesn't want to wear it.I do and so here I am with my blog.Mostly,I shall be sharing things that come in my way.Most of the time I am working on my notebook surfing the net,so I may discuss topics that influence me.

  © Blogger templates ProBlogger Template by Ourblogtemplates.com 2008

Back to TOP