376 reputation
18
bio website infotopie.nl
location Netherlands
age 36
visits member for 3 years, 3 months
seen Sep 22 at 22:05

Mar
27
comment Why are inheritance and interfaces restricted to instance members?
Not sure if I'm fully following all you guys are saying, but the remark that object.function(arg) is just an alternative notation for function(object, arg) is quite enlightening. So the System.Type (or RTTI) is bound to that instance somehow. For static stuff the compiler would dismiss the Type on which a static method was implemented and just do a jump to the compiled address providing the arguments function(arg)? That would kind of explain things (if my assumptions are true).
Mar
27
comment Why are inheritance and interfaces restricted to instance members?
@MichaƂKosmulski Yes, one could force an object to implement a property that returns a singleton with meta-data (well you could not force it to be a singleton, but by convention it would). However you would still need an instance of that object to get to that metadata. Attributes (annotation) work better, but cannot be enforced compile-time. To be honest, I'm not really looking for a workaround (invented many already), rather for the reasoning how this all came about to what it is today.
Mar
27
comment Why are inheritance and interfaces restricted to instance members?
Ok, but if we do have an instance of System.Type to pass on then there should be enough info. I guess that System.Type is quite .Net specific, however I do remember having RTTI before .Net dominated my career. I'm guessing that the reason for not supporting static stuff in interfaces might have to do with keeping things in sync with legacy?
Mar
27
comment Why are inheritance and interfaces restricted to instance members?
With simple little objects that's easy, but with heavier stuff that use resources it's a bit more difficult. Some objects lack default constructors or need quite a bit of mocking in order to get an instance. I have abused FormatterServices.GetUninitializedObject in the past to get around some resource hogs, and I have also used attributes allot. Any way, I was just wondering if the issues are more technical than conceptual of nature. I don't have the illusion that Microsoft will change C# after reading this :-) I just like to know the background and reasons for the choices made.
Mar
27
awarded  Student
Mar
27
revised Why are inheritance and interfaces restricted to instance members?
Elaborate on static interfaces as alternative to reflection
Mar
27
comment Why are inheritance and interfaces restricted to instance members?
Ok, that's a clear answer to why the inheritance part would not make sense, so you've answered half of the question. The other half is about interfaces. I know about functional programming, but for the time being I'm holding onto my trusty statefull encapsulated objects. I was thinking about a complie-time alternative to runtime reflection. I guess I'll edit my question to elaborate.
Mar
27
asked Why are inheritance and interfaces restricted to instance members?
Sep
9
awarded  Nice Answer
Feb
19
awarded  Commentator
Feb
19
comment
I like the quote "I've worked my way up into the top 50 despite being a student for all of that time." Odds in my perspective are you're more likely to work yourself up there while you're a student... After having a full time job and a family to look after, you'll probably swap "dispite" for "due to" or so :-)
Feb
19
awarded  Caucus
Aug
4
comment Industries and types of projects avoiding OO
My advice would be to become a DBA or do another database related job. There are some new technologies allowing to store complex objects into cells, but I don't think these will be adopted large scale in the foreseeable future.
Jul
13
comment Is code reviewing good practice?
As long as it stays collaborative, its good practice. There are some company cultures (up or out) where colleagues are internal competitors. In these circumstances code reviews require social/political skills in addition to technical skills. In that case I'd say it's too stressful. The best code reviews are the informal ones between colleagues: "hey I just pulled an update and saw the code you checked in yesterday. Maybe it would be a better idea if you ... rather than ...". Collaborative and beneficial, not competitive. The projector idea somehow feels like a "let's throw tomato's" excursion.
Jul
4
awarded  Yearling
May
17
comment Making an internship most effective, useful and fun for both parties
Not all interns like social events (programmers in particular tend to be more introvert than... salesmen for example). I guess point A is the best and probably the only definite rule: doing real work. I cannot think of anything more satisfactory than seeing my first project being taken into use (when all those bugs came rolling in from people using it in ways I never imagined it would be used). That's definitely a prerequisite that made my internship a great success!
May
13
comment Why is Global State so Evil?
"but those skills are lost"... not entirely yet. I recently worked at a software house that swears by "Clarion", a code generator tool that has it's own basic-like language that lacks features such as passing arguments to sub-routines... The sitting developers were not happy with any suggestions about "change" or "modernizing", finally got fed up with my remarks and portrayed me as deficient and incompetent. I had to leave...
May
13
awarded  Editor
May
13
revised Are trees organised by a “firstchild, nextsibling” structure? If not, why not?
Added some headings and an example of parent-only trees (database tables)
May
12
answered Are trees organised by a “firstchild, nextsibling” structure? If not, why not?