Getting class instance names via reflection

G

Guest

Jon Skeet said:
Could you give an example of a semantic hole? I don't know of any -
it's just that the terminology you've been using isn't that of the
spec.

Jon,

I meet very few people with your insight and unstoppable energy. The
community is lucky to have you.

I have (already partially written) two posts that answer this since its
fundamental nature is beyond C# but very pertinent to it (semantically).
The two, a short humorous and long serious post deal with semantic
synchronization. I wasn't sure if I was going to post them (I hate to
waste peoples time).

But since this aspect (architectural and design semantics of C#) is of
interest I rewrote your code (x and y code) in a (somewhat) humorous
response to your question. The short humorous post pays homage to you
and, I trust, brings out the 'instance name' validity as a fundamental
perspective of english (human language) semantics.

Here is the short temporary 'answer' instead of an 'example'. The
'example' (above that you request) is actually the long serious post (but
short enough to post) mentioned above.

------ semantic hole ---- semantic collision ------

When we view code we actually see if from several logical domains,
semantic viewpoints, stakeholder perspectives, subjective thought, etc.

These are all synonyms for 'logical domains'.

When we 'cube' the problem space we center the problem space and form a
'cube' of faceted logical perspectives around it. The 'hypothetical domain'
is either the problem space itself or (logically cast out) as another logical
domain if we start to deal with 'semantic synchronization' as herein.

Each 'facet' is a valid, common and inherent way of looking at the problem
space. The problem space is a subjective simulation of objective phenomena.
Subjective thought phenomena simulating objective reality.

Case in point. The hen house.

The fox and farmer both see the hen house from two different logical
perspectives. A good 'hen house design' takes into account the
'subjective role based' logical perspectives of farmer and fox.

As engineers and scientists the 'subjective role based perspectives' are
antithetical and confusing in the search for 'objective phenomena based
perspectives' (the search for 'truth').

Thus when I say 'semantic hole' it refers to a missing keyword or term in
ONE perspective in the 'surface area of the complete logical domain'
inscribed by multiple logical domains. Semantic hole (technically) means
somebody is trying to express the target phenomena (the problem space) but
doesn't have the 'right word' or a 'good word' for their desired SUBJECTIVE
MEANING. Note the personal subjective meaning and objective phenomena never
have
to agree. Community subjective meaning (jungian) expressed in all written
media
should agree in the semantics of community use.

The hypothetical logical domain (subjective simulator for objective
reality) MUST ALWAYS AGREE with semantics used in ALL FACETS of the
complete logical domain (that inscribes the hypothetical problem space).

Note that you must distinguish the different between a 'semantic hole' and
a 'semantic collision'.

A semantic collision is really 'my hip shot feeling' on the 'instance
name' vs 'variable name' issue. A semantic hole was just a shallow hip
shot of the mark (sorry :).

So, I think we have a semantic collision that implies a semantic hole in
the formal C# spec (no big thing there, it wouldn't be the first time).
By this I mean english language semantics override C# spec semantics.

A semantic collision can occur because;

(A) One logical perspective trys to force its terminology on another
logical perspective (C# spec of english semantics used in C# architecture
and design discussions and specifications).

(B) Two logical perspectives use the same term that does not have
formally defined multiple meanings (multiple logical interpretations
matching the perspectives and/or context of use cases).

----- end of semantic hole ---- semantic collision explanation ----

All of this is covered and focused on C# english (and code) semantics in
the two posts. The short post uses LLP (Low level patterns) to track
the code semantics (instance, reference, etc).

So the two posts I mentioned would answer your 'example' request.

The short post (I think) is what you (as a hard core pragmatist) would
like to see. The minimal real world code fragment followed by semantic
discussion examples (in english text - not code text).

The long post is entitled :

C# reflection semantics across 5 logical domains

But I would like to 'work it a bit' to check on a potential '6th' logical
domain.

Please allow me to answer your immediate request (above) with this
incomplete answer. I hope the humor of the 'hard code' rewrite of your
example will be entertaining enough to be worth the wait.

Finally the 'real example' (Reflection semantics across 5 logical domains)
is pertinent to the community (IMHO) since our discussions in this venue
use english. But I fear it is probably too obtuse for this venue. So I'll
just check the response to the short humorous and (if good) post the long
version.

On a personal note. My grandfather could (reportedly) speak 52 human
languages (there are about 3,000 to 7,000). From him I seem to see
everything in multiple facets all at once. This has been more of a help
than a hinderance since I can 'morph' my technical jargon to any 'given'
perspective pretty darn quick (makes me popular with executives and
engineers - so far ).

I will post the (hopefully humorous) rewrite of your 'x and y - whats the
instance name' example.

Thank you as always for your input.

Shawnk

PS. Your (obviously) right that my terminology is 'out of spec'.

PPS. I'll post sometime this week (busy, busy)

PPPS. Mission and schedule are always my focus - this level of discussion
is generally for the architects, designers and book writers among us.
Personally 'I don't care' since I just morph my speech to the audience
(and usually pretty quick). As we approach speech based programming
and code automation however, semantic synchronization is a design issue.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top