Hacker News new | past | comments | ask | show | jobs | submit login

Server-side languages have it easy. Code size isn't much of an issue so reflection works fine.

In a browser where code size matters, there are two ways to go:

1) In JavaScript, every library author needs to figure out how to crunch their library as much as possible and library authors brag about their small code size and minimal dependencies. We have debates about whether JQuery is worth it.

2) You implement tree-shaking so you only pay for the functions you use (GWT, Dart, and the Closure compiler's advanced mode). But tree-shaking doesn't play well with reflection, which is why dart2js reflection is a work in progress.

You can also go with code generation (essentially compile-time reflection) but that also increases compile times and adds code bloat due to the generated code.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact