There is a reason which makes it practically impossible to use fonts other than monospace for coding, but was not mentioned in other answers: rectangular selections.
This feature, often not very useful and not very known when working with ordinary text, is essential for developers. You may imagine a multitude of scenarios: removing //
comments on several lines, adding parenthesis or other characters, etc. This is even more valuable with advanced support of rectangular selections, as in Visual Studio 2010, where you can not only select and remove text, but select and replace it.
Let's take an example:
private IEnumerable<SELove> StackExchangeRocks()
{
var howILoveSEWebsites = new []
{
new SELove { SiteName = "Stack Overflow", MyReputation = 5269, MyRating = Rating.Outstanding, },
new SELove { SiteName = "Programmers", MyReputation = 16937, MyRating = Rating.Outstanding, },
new SELove { SiteName = "Super User", MyReputation = 650, MyRating = Rating.QuiteGood, },
new SELove { SiteName = "Server Fault", MyReputation = 489, MyRating = Rating.Good, },
// Initialize other websites here.
};
return howILoveSEWebsites.OrderByDescending(c => c.MyRating);
}
private class SELove
{
public string SiteName { get; set; }
public int MyReputation { get; set; }
public Rating MyRating { get; set; }
}
private enum Rating
{
Outstanding,
Good,
QuiteGood,
}
In this legacy code, I want to replace in-code rating by a method which will load my rating from Stack Exchange websites themselves, being able to always have an up-to-date data. I started to refactor the MyReputation
property, and now I want to remove the initialization, in scope. Imagine that I have not four, but all 84 SE websites.
Here's what happens when using Consolas, a monospace font. I press Backspace, and that's all, I can spend the remaining time to do something actually useful.
And here the same thing with Segoe UI. Ouch!
[citation needed]
:)