|
C# is a new language shipping with the next edition of Visual Studio. It has several goals.
1/ Reuse the code from J++ now they can't pursue that anymore
2/ Stick it up McNealy/Sun by having their own language which has a published standard
3/ Make it easier for VB users to move to a language that is almost, but not quite C++
4/ Kill cross platform development by discouraging C++ programming for Windows
Generally I can't see the point of it, the world certainly needs C# slightly less than it needed Java.
Christian
#include "std_disclaimer.h"
The careful application of terror is also a form of communication.
Eagles may soar, but weasels don't get sucked into jet engines.
|
|
|
|
|
Wow, bit of unbridled hatred there huh Christian
4/ Kill cross platform development by discouraging C++
Really? Why is C++ more cross-platform compliant? Have I been misled in thinking that .NET with C# actually makes the cross-platform development a bit easier (well at least until someone ports .NET to the other platforms of course.)
3/ Make it easier for VB users to move to a language that is almost, but not quite C++
Well isn't that a good thing? I am a VB programmer (put down the rocks and flail pls! ) and am really chuffed that now with C# I can get so much power but not have to waste my time learning a frustrating language like C++. I want to build solutions, not wrestle with syntax and conventions.
But I agree with the whole "C# is Microsoft's Java" sentiment, but is that so bad? My short lived experience with Java was frustrating, not because of the language but because of all the dependencies and VM hassles. Getting it to work cross-platform was like trying to get a VB programmer into C++, bloody difficult. Lets hope once .NET has been ported things will work seamlessly.
Anyways, I just feel that C# is a good thing and will result in better solutions.
regards,
Paul Watson
Cape Town, South Africa
e: paulmwatson@email.com
w: vergen.org
|
|
|
|
|
I completely agree with Christian Graus.
C# (or any other .NET 'dialect') tries to improve code quality by eliminating some typical pitfalls of C++. Which is a good idea, no doubt; the resulting applications won't crash that often. But i think the *real* problem is that the necessary skills needed to build up stable and clean C++ applications are the same skills needed to build a effective, stable and well-designed application using *any* language whether it has for example a GC or not. Again, i do not doubt the usefulness of C# or the whole .NET basics; but i do doubt it will increase quality of code; IMHO it will need even more discipline to build sophisticated applications.
Signature? What is a signature?
|
|
|
|
|
Thank you - this is the point I forgot to address, and it's the most important one. Making it easy for a pleb to bring up a Window and submit data over the web gives a false sense of accomplishment if it means people forget to learn things like good design and good coding practice. Who is more likely to have learnt such things, the person who learned C++ because it's powerful, or C#/VB because it's easy ?
Christian
#include "std_disclaimer.h"
The careful application of terror is also a form of communication.
Eagles may soar, but weasels don't get sucked into jet engines.
|
|
|
|
|
I agree with you, just giving the world a good tool does not mean it will be used properly.
But I do believe that providing a tool which is both easy and powerful will allow good programmers to push the development of good solutions even further. It will also make it easier for poor programmers to make even worse programmes, naturally.
In my eyes with C++ one has to spend too much time preparing and cleaning up rather than focusing on what is truly important, the functionality and design. Clean up and preparation should be an automated and automatic part of the system. In a way you could say that C# provides a solid base from which one can focus on the solution code. Why do we have header files and classes etc? All those things one has to do in C++ over and over you try your best to put into some kind of reusable code base from which you work on your next project. C# now provides all those common headers and classes out of the box.
Microsoft has learnt from many years of C++ development the pitfalls and also the great features, the wonderful and amazing power of C++ etc. Now taking into account modern day development they have created something which I believe is exposing the best of both worlds.
Bottom line though? I reckon C++ programmers should stick with C++, it is a great tool and ditching all that code and resources just for some new fancy language is a bad idea.
IMHO new programmers or VB programmers looking for something more powerful would be wise to go with C#.
I am sure when C and C++ came along programmers all around the world had arguements like this "but damnit Jim! C++ is so easy and will result in swaths of poor code, lets stick to Assembler it is the best".
regards,
Paul Watson
Cape Town, South Africa
e: paulmwatson@email.com
w: vergen.org
|
|
|
|
|
and another of the main reasons for .Net was to help with coding for those building for both 32bit and 64 bit versions of windows without requiring code rewrites, as everything is compiled to MSIL with it's common type library, all is requires is a .Net compiler and framework on the target platform to convert this to native code and allow it to run without code changes.
BTW: A .Net Framework that runs on Java is underdevelopment, this should mean a version of .net could run on any platform/os that supports Java.
|
|
|
|
|
If I could quote you from the other post
but you will get many nay sayers and disenters who simply rip C# off because A: it is from Microsoft and B: they love their C++ and for some odd reason are so loyal they can't see the need for C#.
Check out my enthusiasm for GDI+ to see I'm not someone who hates M$ automatically. No, I don't see a need for C#, nor do I see that as odd.
Why is C++ more cross-platform compliant? Have I been misled in thinking that .NET with C# actually makes the cross-platform development a bit easier (well at least until someone ports .NET to the other platforms of course.)
1. C++ is EVERYWHERE. Yes, GUI stuff will always need rewriting, unless you use tcl or something, but you can, for example, use OpenGL for graphics in C++ and know that if you use standard components where possible ( like STL ) you won't have much work in getting your code to compile into a native app on another platform.
2. This is the brilliance of it - it won't be M$'s fault that C# is Windows only, it's be the fault of those pesky Linux/Mac guys who didn't get with the program and write CLR's for their platforms. C# is the new Java, so if it's the panacea, we already have total cross platform development and the world has already been changed for the better
3/ Make it easier for VB users to move to a language that is almost, but not quite C++ Well isn't that a good thing? I am a VB programmer (put down the rocks and flail pls! ) and am really chuffed that now with C# I can get so much power but not have to waste my time learning a frustrating language like C++. I want to build solutions, not wrestle with syntax and conventions.
I'm pleased for those who have not taken the time to learn C++ that you can write better programs than you could before, but I maintain that C++ is not that hard. You're saying that VB has no syntax rules or conventions ? I didn't realise it was that pathetic.
Getting it to work cross-platform was like trying to get a VB programmer into C++, bloody difficult.
What I find amusing is the assumption that C# will be any different.
I am (still) waiting for my beta 2 CD. I will learn some C# and if someone pays me I will be happy to use it. But right now I am amused and dismayed at a few things.
1/ Young programmers abandoning C++ for a language that still has no commercial compilers officially released, let alone has stood the test of any time
2/ The assumption that C++ is 'too hard', which makes me think the industry is being dumbed down, which is itself a step to our jobs paying as well as the average office clerk.
3/ The fact that M$ now admit VB is too limited. How long before they admit the same of a language that has no templates, no pointers, etc. ?
All in all, I am adopting a wait and see attitude and am more than happy to play devils advocate to all the hysteria that seems to be doing the rounds right now. If it results in better solutions then so much the better. If it allows people who don't have the time or the capacity to learn C++ to develop the solutions they need, I'm all for languages being easy to use ( I thought C++ *was* such a language though ). If you find C# useful, more power to you. For me it is as useful as a catflap in an elephant house.
Christian
#include "std_disclaimer.h"
The careful application of terror is also a form of communication.
Eagles may soar, but weasels don't get sucked into jet engines.
|
|
|
|
|
C# is a new programming language from Microsoft. Essentially it is Microsofts version of Java but it runs atop the .NET platform.
What it means to me is that I have the ease-of-use of Visual Basic but the power of C++.
Have a look at these links for more info:
C# Introduction and Overview
Sharp New Language: C# Offers the Power of C++ and Simplicity of Visual Basic
So far I am impressed with C#, but you will get many nay sayers and disenters who simply rip C# off because A: it is from Microsoft and B: they love their C++ and for some odd reason are so loyal they can't see the need for C#. By no means must a C++ expert change to C#, but everyone should give it a try and make their own opinion after trying it out.
regards,
Paul Watson
Cape Town, South Africa
e: paulmwatson@email.com
w: vergen.org
|
|
|
|
|
I'm trying to create a Windows Service (not a Web Service) in C# with Beta 2.
I create a new Windows Service, and add the installer. I didn't do anything else - I just wanted a minimum windows service. When I try to install it with InstallUtil.exe, I get the following output:
An exception occurred during the Install phase.
System.NullReferenceException: Value null was found where an instance of an obje
ct was required.
The log it generates tells me the same info it prints out.
Has anybody written a windows service in C#? If so, could you tell me what I'm doing wrong? Thanks.
Craig Dodge
A catchy signature should appear here.
|
|
|
|
|
visit www.intellibench.com for free c# certification
|
|
|
|
|
On running of a C# webservice (built in Visual Studio .NET Beta 2) I am getting the following error:
<br>Compiler Error Message: CS0234: The type or namespace name 'Global' does not exist in the class or
namespace 'Service1.Service1' (are you missing an assembly reference?)<br><br>Source Error:<br><br> <br><br>Line 27: <br>Line 28: [System.Runtime.CompilerServices.CompilerGlobalScopeAttribute()]<br>Line 29: public class Global_asax : Service1.Global {<br>Line 30: <br>Line 31: private static bool __intialized = false;<br> <br><br>
Building the service works fine, but running it in IE produces the above error.
I would greatly appreciate any help as I can get VB.NET webservices to work but not C# webservices.
regards,
Paul Watson
Cape Town, South Africa
e: paulmwatson@email.com
w: vergen.org
|
|
|
|
|
I love it when a plan comes together... after much fiddling around I figured out how to get around the problem.
All you need to do is to bring up the properties of your project (right-click the Project in the Solution Explorer) and fill in the file name of your main Service or Webform in the Startup Object field.
That should solve the problem, it did for me.
regards,
Paul Watson
Cape Town, South Africa
e: paulmwatson@email.com
w: vergen.org
|
|
|
|
|
Does anyone has real performance bench-mark results using C# comparing to C++ or Java?
|
|
|
|
|
If anybody does, it's unlikely they'll be talking about them, as the BETA2 EULA prohibits publishing benchmark results.
|
|
|
|
|
Hi,
I am a beginner of C#,I don't know how to read the "C#" in English.Would u please tell me?
TKS!
***
We are making progress everyday!
At XiaoYu Workshop.
***
|
|
|
|
|
|
No worries Youngar, I also struggled at first and I am a born and bread englishman. The # does not refer to the word "hash" (as used in numbers) as I first thought but apparently to some component of writing music (how that relates to programming I have no clue).
You pronounce it "See Sharp".
regards,
Paul Watson
Cape Town, South Africa
e: paulmwatson@email.com
w: vergen.org
|
|
|
|
|
If you're determined that C# is a good idea, then I guess you'd buy a book, or look on the MSDN.
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
Can anybody point me in the direction of some good samples of calling Win32 API functions from C#. Something a little more detailed than the MessageBox and GetSystemDirectory samples.
I'm trying to convert some c++ code that uses TAPI 2.x to c#. Any ideas whether the variable length structures that TAPI uses will cause c# problems?
Michael
|
|
|
|
|
Variable length structures aren't something you can do directly from C#; the marshaller wasn't designed to handle them.
Your best bet is to write a wrapper using the Managed Extensions to C++, and then call it from C#. If you send me some email, I'll send you a powerpoint presentation and some sample code I did a while back.
Eric
EricGu@microsoft.com
|
|
|
|
|
Hi! I’m new in .NET and I’m going start playing with C#.
I installed .NET FRAMEWORK BETA 2.
Does anyone know Inside C# by Tom Archer up today (BETA 2) or any other books which will concentrates on C#.
Best regards.
Igor.
|
|
|
|
|
See http://www.dotnetbooks.com.
|
|
|
|
|
Yes Igor. 'Inside C#' was written with Beta2. http://www.codeguru.com/announcements/dotnetbooks.html has a list of .NET books including which ones are written for beta2.
Please feel free to email me (tarcher@mindspring.com) if you have any specific questions about my book.
Cheers,
Tom
"Ya got lucky, ya lucky prick" - Keith McCready
|
|
|
|
|
I like the books published by WROX. I find then very good. The books gets the message accross on a professional level that i like.
|
|
|
|
|
I'd like to know if with C# is possible to develop Win32 native(EXE) application (in the "old" stile, without the need of CLR).
Thanks.
|
|
|
|