Jan,
It's not that I thought it would be a particularly *sane* idea, I just
wanted to know if it was possible (and idiomatic, to some degree). I
didn't imagine this was the case but being new to Go it helps to find
the boundaries of the language—and get reacquainted with the general
boundaries of static languages, having used exclusively dynamic
languages for the past decade.
This sort of thing informs my usage of third-party APIs, as well as how
I construct my own. Knowing the limits of reflection and runtime
behavior and the expected use cases for an API, I can better decide what
sorts of arguments to have (and what to look for in others' APIs, as
well). For instance, perhaps knowing some degree of flexibility was in
order, the AppEngine Go team allows Entities to be struct pointers *or*
anything that implements a particular interface. By contrast, the Python
team assumes you will use the supplied `Model` subclass which makes many
assumptions and has many private APIs, but is more dynamic in terms of
ad-hoc definition and runtime specification modification.
Go is a beautifully simple and succinct language; most of its
capabilities are quite obvious. I'm just trying to round out my
knowledge by testing the edges of its reflection and other "1%
capabilities". I do appreciate you response :)
Cheers,
Tom
>
> -j