Freigeben über


Generics

I’m not much of a Language sort of guy (either real or computer, I failed French 3 times at school) so when I was asked to participate in a workshop at the upcoming OT2004 conference on generics I said 'no way'.

I always have problems in translating the wordage that is used in programming to my model of how things work that gives me problems with languages. I remember struggling to learn C until it was pointed out that it was just like a very smart MASM; I then cottoned on very quickly. I then went on to message based programming with the Transputer and OCCAM (anyone remember this?) rather than C++ so missing out on the OO world and leaving me vaguely uncomfortable with Polymorphism etc. I never really understood the fuss about Java, it just looked like another programming language with support for some higher level concepts to me.

I’m also nervous about languages which have lots of rich functionality; I remember working with an APL guru who boasted that he could write pretty well any application in one line of APL. I challenged him ato do this and he did indeed write a complex application in one line of APL. Alas no one could understand the one line and a week later he didn’t understand it either.

Anyway programming Languages have never been my forte so I was happy to decline the generics session. However I have been sort of roped in as an assistant so I feel I should know something about them. As the conference is coming up I have spent the last couple of days researching generics and trying to get the usual impenetrable jargon to gel with my understanding of how languages and programming work. I have read the reference papers at https://developer.microsoft.co.uk/Portal/DesktopDefault.aspx?tabindex=2&tabid=85&sectionhome=true but they have not helped much.

The conclusion that I am sort of coming to is that we started off with templates and generics are just a smarter version of that on the way to a true Aspect Oriented Approach, as a sort of half way house.

Funnily enough I have never had a problem with AOP because it fits so well into the hardware work I used to do, particularly VHDL. This has the concepts of functional elements of the program and other aspects such as timing and power which really resonate with me. So I understand what AOP is all about and how it works, I’m just less clear with the halfway house stuff like generics.

Well I will continue to read and see if it clicks but if anyone has any good, clear papers or pointers to pages on generics let me know.. Please!

Comments

  • Anonymous
    March 16, 2004
    I remember Occam fondly - I did my final year university project in it purely because it seemed interesting. Completely against the advice of my tutor, and I gained my lowest mark of the year (more I think because he didn't understand it), but heck I learned alot.

    I'm almost the opposite - I'm more into the languages and never really got into the design side of things - patterns and stuff.

    Articles - this is quite good
    http://www.15seconds.com/issue/031024.htm
  • Anonymous
    March 16, 2004
    I really liked OCCAM, all the focus was on the threading and messaging (remember PRI / ALT / PAR?) rather than the programming.
    Thanks for the link
  • Anonymous
    March 16, 2004
    The comment has been removed
  • Anonymous
    March 17, 2004
    The comment has been removed
  • Anonymous
    March 17, 2004
    Good new paper on Java Generics http://java.sun.com/j2se/1.5/pdf/generics-tutorial.pdf

    Interesting discussion on Latent Typing and safety (among other things!) following on from Bruces blog athttp://www.theserverside.com/news/thread.tss?thread_id=24445#113712

    Quiz on Java Generics at http://www.grayman.de/quiz/java-generics-en.quiz
    So I didnt do too well, I will go back over the tutorial!