What are the bad features of C#?
-
Not being able to convert an old project in order to recompile against later frameworks, if you didn't get the version of VS that did the conversion. VS2003 will convert 2001 projects. VS2005 won't. It's a similar situation converting Visual C/C++ 6 projects. in VS2005 it can't be done unless you happen to have VS2003 lying around to do an intermediate conversion. I suppose the fear factor will keep the money rolling in for Microsoft when developers get wind of these issues. A syntax shortcoming recently discussed on CP.
break <label>;
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan That's what machines are for. Got a problem? Sleep on it.
I haven't seen that problem. It's possibly related to the project file format changes when they switched to MSBuild. From what I've seen, VS2012 can open projects created in 2005, 2008 or 2010 without any problems (unless the project type has been discontinued, which happens far too often!).
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
I haven't seen that problem. It's possibly related to the project file format changes when they switched to MSBuild. From what I've seen, VS2012 can open projects created in 2005, 2008 or 2010 without any problems (unless the project type has been discontinued, which happens far too often!).
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
Yes, the project file format changed between VS2003 and 2005, and like you say MSBUILD is the new way of doing things. I tried the express version of VS2008 but it drove me nuts. I'll be sticking with VS2005 until I find something equally stable/reliable. I don't need LINQ features right now, just x64 bits.
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan That's what machines are for. Got a problem? Sleep on it.
-
What are, in your opinion, the bad features of C#?
The quick red ProgramFOX jumps right over the
Lazy<Dog>
. -
AspDotNetDev wrote:
List<string> textReps = myList.Select((x) => x.ToString()).ToList();
Easy to break: ;P
List<object> myList = new List<object> { 1, "dragon", null };
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
It's a feature. Helps you find the nulls. :rolleyes:
-
Not being able to convert an old project in order to recompile against later frameworks, if you didn't get the version of VS that did the conversion. VS2003 will convert 2001 projects. VS2005 won't. It's a similar situation converting Visual C/C++ 6 projects. in VS2005 it can't be done unless you happen to have VS2003 lying around to do an intermediate conversion. I suppose the fear factor will keep the money rolling in for Microsoft when developers get wind of these issues. A syntax shortcoming recently discussed on CP.
break <label>;
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan That's what machines are for. Got a problem? Sleep on it.
What problem have you had converting Visual C/C++ 6 workspaces? I've been able to convert them using VS2005, VS2008, and VS2010 by simply double clicking the .dsw file from Windows Explorer.
BDF I often make very large prints from unexposed film, and every one of them turns out to be a picture of myself as I once dreamed I would be. -- BillWoodruff
-
What are, in your opinion, the bad features of C#?
The quick red ProgramFOX jumps right over the
Lazy<Dog>
.I thought we went over that last week. http://www.codeproject.com/Lounge.aspx?msg=4510499#xx4510499xx[^]
-
In your first example, it's not immediately obvious what you're expecting to happen. Should the output be:
{ 1, 4, 6, 8, 21, 2, 1, -3, 5, 9 }
Or:
{ 3, 5, 3, 13, 30 }
If it's the second option, what should happen if the operands have different lengths? Different types? Different ranks? Your solution has a much higher cognitive overhead than simply:
int[] c = a.Zip(b, (x, y) => x + y).ToArray();
For your second example, you could use:
List<string> textReps = myList.ConvertAll(Convert.ToString);
It even works with arrays:
string[] testReps = Array.ConvertAll(myArray, Convert.ToString);
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
I meant piecewise add, as implemented in APL family languages, or R or Matlab etc. Different lengths, error; different types, depends on what arguments the function will accept; different ranks, fine if the function can take an array/list on one side and a scalar on the other, for example
int[][] a = { { 1, 2, 3}, {4, 5, 6}, {7, 8, 9}};
int[] b = {10, 20, 30};
int[][]c = a + b; // {{11, 12, 13}, {24, 25, 26}, {37, 38, 39}}Your solution has a much higher cognitive overhead than simply:
What? How can something which has two function calls, an implicit loop and a lambda be 'simpler' than a single symbol, 'add these things up'? The second example was only using ToString as an example of a method call, you should be able to call any method on the element type.
-
I meant piecewise add, as implemented in APL family languages, or R or Matlab etc. Different lengths, error; different types, depends on what arguments the function will accept; different ranks, fine if the function can take an array/list on one side and a scalar on the other, for example
int[][] a = { { 1, 2, 3}, {4, 5, 6}, {7, 8, 9}};
int[] b = {10, 20, 30};
int[][]c = a + b; // {{11, 12, 13}, {24, 25, 26}, {37, 38, 39}}Your solution has a much higher cognitive overhead than simply:
What? How can something which has two function calls, an implicit loop and a lambda be 'simpler' than a single symbol, 'add these things up'? The second example was only using ToString as an example of a method call, you should be able to call any method on the element type.
BobJanova wrote:
What? How can something which has two function calls, an implicit loop and a lambda be 'simpler' than a single symbol, 'add these things up'?
My longer version is simpler to read and understand than your single-symbol version, because you don't have to stop and think about the precise behaviour of the symbol. As I mentioned, there are several possible things that
(int[]) + (int[])
could mean; you've just chosen one arbitrarily based on another family of languages. Think of it like using XOR to swap integers[^]; it might look cool and avoid the need for a temporary holding variable, but it's much harder to understand at a glance than a simple swap.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
The fact that (like C, C++, java, VB.NET) there are two (2) types of whitespace in source code, which give endless hours of argument between fanboys of the "tabs not spaces" and "spaces not tabs" religions.
-- Harvey
Don't forget line endings: http://www.hanselman.com/blog/YoureJustAnotherCarriageReturnLineFeedInTheWall.aspx[^] And I don't think these arguments are restricted to any particular language. The only languages which are immune are the ones where white-space is significant.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
What are, in your opinion, the bad features of C#?
The quick red ProgramFOX jumps right over the
Lazy<Dog>
.Don't know if this is specifically C# or a general .NET thing, but
protected internal
meaningprotected
ORinternal
so I can't have something restricted to only be accessible to derrived objects within the assembly :mad:Dave
Binging is like googling, it just feels dirtier. Please take your VB.NET out of our nice case sensitive forum. Astonish us. Be exceptional. (Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)