Hacker, author, trainer
Technorati Profile [technorati.com]
This beginners training course is proving to be very interesting. Here are a couple of scenes from yesterday's class. Our protaganists are davorg. (the trainer, our hero) and Visual Basic Programmer[1].
Scene One: [davorg is standing at the front of the class and is explaining a slide that introduces the comparison operators (==, !=, etc.)]
VBP: Excuse me, but why do you use two equals signs to test for equality?
d: Because Perl needs to differentiate between assignment (=) and comparision (==). Many other languages (C, Pascal and Java for example) do the same thing. How does VB do it?
VBP: VB just uses the single equals for both.
d: OK. So how does it know if you're doing an assignment or a comparison?
VBP: Well, if you're in an if statement then it must be comparision.
d: But that stops you from doing an assignment within a conditional expression.
VBP: True, but why would you want to do that?
[At this point other members of the class with experience in C and Java chime in with examples of why it's useful to have an assignment in a conditional expression, but VBP remains unconvinced.]
Scene 2: [After the course has finished. davorg is talking to VBP in order to get more understanding of his programming experience.]
VBP: Have you looked at C# at all?
d: No, I haven't, but I know people who have and say it's quite a nice looking language. Not sure that I'd use it though, as I don't like the idea of paying for a programming language.
VBP: Oh, I see. Personally, I'm far happier using a language with proper support.
[Exit davorg, stage right, stifling major giggles.]
Note to self: Take another look at VB's syntax before the next class on Monday.
[1] I didn't mention it before, but after the first day this person told me that Perl looked like a pretty good language but that he was used to something more powerful like VB.
C# (Score:1)
Re:C# (Score:1)
Re:C# (Score:1)
Re:C# (Score:1)
wow... (Score:1)
But ya know ... 20 Million VBP can't be wrong! *laugh*
Jason