C# Development – Is It Inseparable from the IDE?

ccultureidepythontext-editor

I'm a Python programmer learning C# who is trying to stop worrying and just love C# for what it is, rather than constantly comparing it back to Python.

I'm caught up on one point: the lack of explicitness about where things are defined, as detailed in this Stack Overflow question. In short: in C#, using foo doesn't tell you what names from foo are being made available, which is analogous to from foo import * in Python — a form that is discouraged within Python coding culture for being implicit rather than the more explicit approach of from foo import bar.

I was rather struck by the Stack Overflow answers to this point from C# programmers, which was that in practice this lack of explicitness doesn't really matter because in your IDE (presumably Visual Studio) you can just hover over a name and be told by the system where the name is coming from. E.g.:

Now, in theory I realise this means when you're looking with a text editor, you can't tell where the types come from in C#… but in practice, I don't find that to be a problem. How often are you actually looking at code and can't use Visual Studio?

This is revelatory to me. Many Python programmers prefer a text editor approach to coding, using something like Sublime Text 2 or vim, where it's all about the code, plus command line tools and direct access and manipulation of folders and files. The idea of being dependent on an IDE to understand code at such a basic level seems anathema. It seems C# culture is radically different on this point. And I wonder if I just need to accept and embrace that as part of my learning of C#.

Which leads me to my question here: is C# development effectively inseparable from the IDE you use?

Best Answer

Visual Studio is so convenient that after working with it for a while it is difficult to use a different IDE. It has a lot of handy tools and a bunch of plugins available, so practically it has every feature you would need.

On the other hand, whatever language you learn, it is recommended to use command line at the beginning, so you can better understand how it works. C# isn't an exception.

is C# development effectively inseparable from the IDE you use?

Theoretically no, but practically yes. It is possible to write in C# using a text editor and command line, but if you have Visual Studio, you'd never do this. In fact very few programmers have ever executed C# code from command line.

BTW If you feel inconvenient with using foo, you can use the whole path when using a type.

Related Topic