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.
Re:C#
pudge on 2001-11-15T12:29:59
I like languages enforcing style on me. It's easier to get to the point where I can be an expert in that language, because I don't have to worry about thinking for myself or coming up with a style that works for me. When the language can tell me what is best, I feel safer and smarter and thus happier.Re:C#
Matts on 2001-11-15T15:17:19
Whooaaa... dude, what are you doing using Perl then!;-) Re:C#
chromatic on 2001-11-15T17:43:17
Perl: It's for sarcastic programmers.
But ya know
Jason