Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Why I still Lisp. Parent comment
By using reflection you only lose type-safety for this particular function. With a dynamic language, you lose it everywhere.
And it's still an one-liner or close in a language without much ceremony (e.g. not Java 1.5).
Example implementation (pseudo-code):
fun capitalize (o: object) -> [f.toUpper() for f in reflection.fields(o) if reflection.type(f) == "string"]
There are no comments on this comment yet.
By using reflection you only lose type-safety for this particular function. With a dynamic language, you lose it everywhere.
And it's still an one-liner or close in a language without much ceremony (e.g. not Java 1.5).
Example implementation (pseudo-code):