einaros/ws — pull request #59 by nicokaiser (2012-04-12 10:19:15+00:00)
Title: Remove Object.defineProperties and set properties directly

Fixes #43 and makes code clearer and simpler.

I'm aware that read-only properties are nice, but

1) even in the node core libraries, properties are set directly. If anyone overwrites them, well...

2) Object.defineProperty seems to break garbage collection (see #43 and http://code.google.com/p/v8/issues/detail?id=2073)

3) The code is much cleaner with properties directly set. They are still enumerable (see tests).