InfoQ

Topic/Tag specific view

All content and news on InfoQ about Syntax


News about Syntax

StyleCop – Microsoft's Style Enforcement Tool for C#

Community
.NET
Topics
Syntax,
Programming

Style enforcement has long been a hotly debated topic. Not only are their arguments over what style a team should standardize on, but also on whether or not there should be a standard style at all. In a move that is sure to add fuel to the flames, Microsoft has released StyleCop, the style enforcement tool they use internally.

C# Debate: When Should You Use var?

Community
.NET
Topics
Syntax,
Programming

C# 3 added the keyword "var". This allows for local type inference when the compiler can unequivocally determine what type the variable should be. There is, however, some debate as to when it should be used.

Collection Initializers in VB

Community
.NET
Topics
Syntax,
Programming

Collection initializers were supposed to be released along with LINQ in C# 3 and VB 9. While C# did get them, they were cut from the VB release. Part of the reason was the Visual Basic team wanted to make VB's version more powerful. We present the leading options for the new syntax.

Implicit line continuations in Visual Basic

Community
.NET
Topics
Language Design,
Syntax,
Programming

Line continuation characters have always been a wart on the VB syntax. Unlike languages in the Pascal and C families, Visual Basic does not require a trailing semi-colon to denote the end of a statement. The trade-off for this is that it does need a character to indicate when the statement does not end. Paul Vic is proposing to eliminate continuation characters in most common cases.