Author Topic: A C# Event Primer (for iago!)  (Read 21309 times)

0 Members and 1 Guest are viewing this topic.

Offline MyndFyre

  • Boticulator Extraordinaire
  • x86
  • Hero Member
  • *****
  • Posts: 4540
  • The wait is over.
    • View Profile
    • JinxBot :: the evolution in boticulation
A C# Event Primer (for iago!)
« on: October 16, 2007, 03:08:05 am »
This was for iago!!! :)
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Our species really annoys me.

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: A C# Event Primer (for iago!)
« Reply #1 on: October 16, 2007, 12:18:40 pm »
I don't have time to read it right now (late for work -- damn you x86!), but a big TIA goes out to you for when I finally do.
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline while1

  • x86
  • Hero Member
  • *****
  • Posts: 1013
    • View Profile
Re: A C# Event Primer (for iago!)
« Reply #2 on: October 16, 2007, 12:44:35 pm »
Sweet.

Thanks Mynd.  Although I'm not in a situation where I'm required to familiarize myself with C# for a job or school, as a hobby I always enjoy expanding my scripting and programming language repertoire.

Reading the first couple of paragraphs, it seems like this primer is great for someone like myself too because I'm in the same boat as you when you first started with C# (AP CS and one semester of Java at university, but not any advanced or extensive use of Java).

Thanks again, now I have some reading material for my two hour backseat drive to university.
I tend to edit my topics and replies frequently.

http://www.operationsmile.org

Offline Camel

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
    • BNU Bot
Re: A C# Event Primer (for iago!)
« Reply #3 on: October 22, 2007, 02:37:25 am »
Always remember to check for nullility!

<Camel> i said what what
<Blaze> in the butt
<Camel> you want to do it in my butt?
<Blaze> in my butt
<Camel> let's do it in the butt
<Blaze> Okay!

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: A C# Event Primer (for iago!)
« Reply #4 on: October 23, 2007, 09:33:12 am »
Incidentally, thanks for writing that. I'll read it soon! :)

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: A C# Event Primer (for iago!)
« Reply #5 on: November 05, 2007, 04:24:00 pm »
All righty!

I started reading it, and realized I was somewhat over my head. So I went and read this tutorial and read it again. Much better the second time around!

The part of the tutorial about events confused me, but after reading your primer I understood. Woohoo!

Offline MyndFyre

  • Boticulator Extraordinaire
  • x86
  • Hero Member
  • *****
  • Posts: 4540
  • The wait is over.
    • View Profile
    • JinxBot :: the evolution in boticulation
Re: A C# Event Primer (for iago!)
« Reply #6 on: November 05, 2007, 07:37:27 pm »
Awesome, glad to hear it! Are you a convert yet?
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Our species really annoys me.

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: A C# Event Primer (for iago!)
« Reply #7 on: November 05, 2007, 11:24:41 pm »
From what I've seen, definitely not. Everything about the language feels icky and hackish. The whole "We need to do this" "We can't" "Find a way!" mindset. I don't like it at all. I hate overloaded operators a lot, and the "properties" thing has the same icky feeling to it that I don't like in overloaded operators.

So yeah, overall, I hate it. I think they had some good ideas, but they made the mistake of trying to make it look like C++. I don't know how I would have done it, but I don't like how they did.

Offline Camel

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
    • BNU Bot
Re: A C# Event Primer (for iago!)
« Reply #8 on: November 05, 2007, 11:26:57 pm »
Agreed!

Java is, syntactically, beautiful. As for its implementation, well, that's another story.

<Camel> i said what what
<Blaze> in the butt
<Camel> you want to do it in my butt?
<Blaze> in my butt
<Camel> let's do it in the butt
<Blaze> Okay!

Offline abc

  • Hero Member
  • *****
  • Posts: 576
    • View Profile
Re: A C# Event Primer (for iago!)
« Reply #9 on: November 06, 2007, 09:48:56 am »
Agreed!

Java is, syntactically, beautiful. As for its implementation, well, that's another story.

Funny, I hate Java, but I love C#.

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: A C# Event Primer (for iago!)
« Reply #10 on: November 06, 2007, 10:12:32 am »
Agreed!

Java is, syntactically, beautiful. As for its implementation, well, that's another story.

Funny, I hate Java, but I love C#.

C# has a lot of nice ideas, but I don't like how they were implemented at all.

Offline Warrior

  • supreme mac daddy of trolls
  • Hero Member
  • *****
  • Posts: 7503
  • One for a Dime two for a Quarter!
    • View Profile
Re: A C# Event Primer (for iago!)
« Reply #11 on: November 06, 2007, 10:25:47 am »
Agreed!

Java is, syntactically, beautiful. As for its implementation, well, that's another story.

Funny, I hate Java, but I love C#.

C# has a lot of nice ideas, but I don't like how they were implemented at all.

What do you mean specifically?
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: A C# Event Primer (for iago!)
« Reply #12 on: November 06, 2007, 11:34:35 am »
A lot of different things. But I know better than to get into a discussion about anything Microsoft-related with you, so I'm not going to bite.

Offline Warrior

  • supreme mac daddy of trolls
  • Hero Member
  • *****
  • Posts: 7503
  • One for a Dime two for a Quarter!
    • View Profile
Re: A C# Event Primer (for iago!)
« Reply #13 on: November 06, 2007, 11:39:43 am »
A lot of different things. But I know better than to get into a discussion about anything Microsoft-related with you, so I'm not going to bite.

I won't jump, promise. I genuinely want to know
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: A C# Event Primer (for iago!)
« Reply #14 on: November 06, 2007, 12:04:58 pm »
A lot of different things. But I know better than to get into a discussion about anything Microsoft-related with you, so I'm not going to bite.

I won't jump, promise. I genuinely want to know

Fine, since you promised. These are just the things that bug me most.

My least favorite thing so far is pointers, though. Having to declare variables as "fixed" indicates a fundamental problem: they're trying to add a low-level paradigm to a high-level language, and end up with ugly constructs like that. It doesn't have a good feeling to me.

I also hate operator overloading. To me, a + should always add and a << should always left-shift. C# provides operator overloading, which is something I can get over. However, when using, for example, delegates, you add all your events to your delegate with + and remove them with -. That kind of thing just isn't right, to me. Then when you want to find out if it's empty, you compare it to null. That's just confusing, it took me awhile to figure out how a non-reference variable could be null. In my opinion, it's exactly why operator overloading is bad.

Another thing I don't like is that they .. damnit, I got an email and left for 10 minutes, so I totally forget what I was writing. Ohwell. :)