Posterous

Adios’ Notes

Filed underreflection

See all posts on Posterous with this tag »

Adios Tsai


   
Adios Tsai's profile »

Tags

  • programming (8)
  • C (4)
  • Autoconf (3)
  • Autotools (3)
  • Developer (3)
  • freebsd (3)
  • python (3)
  • CFLAGS (2)
  • GCC (2)
  • Gentoo (2)
  • View all 30 tags »
  • rails (2)
  • reflection (2)
  • ruby (2)
  • AntiAlias (1)
  • design pattern (1)
  • freebsd c programming (1)
  • freebsd c programming rpc (1)
  • freebsd pcre amd64 (1)
  • gae (1)
  • google (1)
  • google wave (1)
  • javascript (1)
  • Linux (1)
  • lisp (1)
  • ssh (1)
  • syslog (1)
  • tips (1)
  • vim (1)
  • webrick (1)
  • Windows (1)
Subscribe to this posterous »
Unsubscribe »
Loading...
November 3, 2009

Reflection (computer science) - Wikipedia, the free encyclopedia

  • Edit
  • Delete
  • Autopost

ECMAScript

Here is an equivalent example in ECMAScript, and therefore works in JavaScript and ActionScript:

// Without reflection
new Foo().hello()
 
// With reflection
 
// assuming that Foo resides in this
new this['Foo']()['hello']()
 
// or without assumption
new (eval('Foo'))()['hello']()

[edit]

via en.wikipedia.org

Tweet

Filed under  //

  • javascript
  • programming
  • reflection

Comments [0]

November 3, 2009

Reflection (computer science) - Wikipedia, the free encyclopedia

  • Edit
  • Delete
  • Autopost

Common Lisp

Here is an equivalent example in Common Lisp:

;;Without reflection
(hello)
 
;;With reflection
(funcall (find-symbol "HELLO"))

[edit]

via en.wikipedia.org

Compiled Language using symbol table.

Tweet

Filed under  //

  • lisp
  • programming
  • reflection

Comments [0]