Hacker News new | ask | show | jobs
by masklinn 4860 days ago
> The author then continues to say that the comparison symbols in C# are "stupid" compared to Basic's "And", "Or", etc. This argument almost doesn't deserve to be addressed

It does. I'm pretty sure VB's "And" and "Or" don't short-circuit…

> 8. The author complains that the type for a variable declaration precedes the variable name in C#. Somehow this is a major problem. Obviously just scraping the bottom of the barrel here.

The author also complains that out-parameters have to be annotated as out-parameters in C#, apparently does not realize parameters don't have to be out-parameters.

> But he retorts that, "The point is that - as so often - Visual Basic makes something easier to code than C# does."

Basically, he complains that C# makes it harder to do the wrong thing than Visual Basic. Which tells you a lot about the mindset.

3 comments

> It does. I'm pretty sure VB's "And" and "Or" don't short-circuit…

Interesting, didn't know that. However, I got the feeling that he wasn't talking about how the operators work so much as what they are named.

You are correct; 'And' and 'Or' do not short circuit. You have to use 'AndAlso' and 'OrElse' if you want short circuiting.
AndAlso and OrElse are the short-circuiting equivalents.