サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
アメリカ大統領選
codeblog.dhananjaynene.com
I came across an interesting post Metaprogramming: Ruby vs. Javascript, which discusses and contrasts about how metaprogramming can be implemented in Ruby and Javascript. I thought it might be fun to document the same from a python perspective as well. Here are the discussed samples. All the ruby code is quoted from from the blog post linked to above whereas the python code is what I wrote. 1. Ini
After 10 Scala / Ruby / Clojure / CoffeeScript one liners to impress your friends, i thought it might be interesting to quickly try out the same in Python too. Without much ado.. here goes. Note that the variable declarations and imports are on separate lines as necessary. Also every line is written so as to print out the results to stdout for quick verification For what it is worth, this hardly t
What are multi-methods used for ? Simply put, they allow for function overloading, ie. they allow for different implementations of the same function to be provided for different contexts, and the appropriate context and therefore the implementing function to be automatically selected and performed at runtime. The typical method of function overloading is based on differing type based signatures (a
このページを最初にブックマークしてみませんか?
『codeblog.dhananjaynene.com』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く