|
harold aptroot wrote: The C# compiler is written in C++, by the way.
Irrelevant what language it is written in as long as it does the job.
|
|
|
|
|
Actually, it is relevant this time. Not to the product, but to the discussion. Specifically, it shows that
JimmyRopes wrote: Do you think you are a better software engineer that the folks that wrote the C# compiler? Can you see a marked improvement in efficiency? I doubt it. either makes no sense, or is unclear enough that I completely misunderstood it (or maybe even both).
|
|
|
|
|
JimmyRopes wrote: Do you think you are a better software engineer that the folks that wrote the C# compiler? Can you see a marked improvement in efficiency?
I was questioning why pointer arithmetic is so glamorous. I have spoken with some people who think they are "computer scientists" because they work with pointer arithmetic and that anyone who doesn't is somehow inferior.
It is only arithmetic after all.
I coded professionally for 18 years in assembler before going to C++ so I wasn't so enamored with pointer arithmetic. It was just something you did.
|
|
|
|
|
All right, that makes sense
|
|
|
|
|
glennPattonWork wrote: the software guy was if it's not C++ it won't work despite my doing everything in C# a lot quicker
I have run into this very same problem. These people are not open to change in the way they do things. They know how to do it in C++ and don't want to learn a new way of doing things regardless of any advantages.
I coded in C++ for 10 years and C# for 6 years and the major reason I prefer C# for Windows systems is the .NET runtime.
If I release something in C++ it is frozen in time. If subsequently some system DLL I used is found to have , lets say, a security flaw and is re-released with a fix I need to know about it and re-compile my system and re-release it to all my customers. Not an easy task.
With C# I don't have to do anything because Microsoft updates the runtime modules and all is well. No effort on my part.
The person who started this discussion stated that he wanted to do some cross platform work so C# isn't in the equation, but C++ is distributed on many platforms so it would be the language of choice for cross platform compatibility.
modified 6-Feb-14 9:01am.
|
|
|
|
|
Mmmm, C# is not really cross platform I agree, I use C for that. I have found that if you compare an object oriented properly designed exe to a functional C coded exe the C is smaller and runs with less resources!
|
|
|
|
|
JimmyRopes wrote: If I release something in C++ it is frozen in time....With C# I don't have to do anything
Just curious...
Do you write a lot of applications which you never update again?
Do you do any testing of existing applications with new updates to windows or do you just assume that they will work?
|
|
|
|
|
jschell wrote: Do you write a lot of applications which you never update again?
Sometimes yes and sometimes no.
I have had applications which have never been changed after initial release (good specifications of the problem at hand) and I have had applications that were scheduled to be changed while still in development or system test and due to be released (planned enhancement to avoid feature creep resulting in never getting a product to market).
I would have to concede that multiple releases are more prevalent (in which case the latest system dll will be used), but there have been cases where the product was frozen and no further enhancements will be forthcoming.
jschell wrote: Do you do any testing of existing applications with new updates to windows or do you just assume that they will work?
Yes and no.
Sometimes I am aware of the changes that have taken place and I run some regression testing to see if anything is broken with a new release of the .NET runtime, and other times, either don't know about a change that has been implemented or the application is history and no longer actively supported.
That is not to say that if a problem ticket is opened for a specific problem that it will not be addressed. It is just saying at some point one must move on and concentrate on on-going development.
In a perfect world we would re-test every application we have ever written, but in the world I live in, sorry to say, that only happens in theory.
|
|
|
|
|
This is a general thread reply, not an original post reply.
Seeing the C++ / C# discussion, coming from a BASIC / FORTRAN / VB background, it is VERY humourous...
|
|
|
|
|
Always a good tool for your toolbox.
If you ever do any embedded you will need C/C++!
|
|
|
|
|
C++ Embedded? I always thought the size too large, mind you I have seen a couple of C++ compatible compilers from TI and Atmel, not Microchip though...
|
|
|
|
|
With the memory footprint on uControllers increasing the need for shoehorning code on some of the chips is not necessary, mind you it all depends on what you're doing.
I've used C++ on a couple of large projects on the ATMega1280/ATMega2560 boards and not had a bit of problems. There are limitations; you can't do a lot of dynamic memory allocation because the memory management on them is pitiful, if timing is an issue you have to use assembler but you have to do that in C also and interrupts are a bit tricky.
I don't use uChip so can't comment on there platform but for AVR I've had no problems and have written many libraries using C++.
|
|
|
|
|
I've done a lot of programming over the past 25 years (started with Fortran for mainframes, C for 8 bit microcontrollers, and C++ with some VB for Windows apps). Now I use C# almost exclusively precisely because of the .NET framework.
I have also done some C++/CLI for interoperating .NET DLLs with native applications.
My point?
Language and tools are just that.... Tools to get a job done. Pick the best one for the job at hand.
Having said that, if I were doing cross platform work I would use Mono and avoid the parts of the .NET framework not supported by Mono. Frankly, it takes me a lot fewer lines of code to do the same thing using C# and .NET versus C++.
|
|
|
|
|
Hi All,
I feel suitably humbled I know I should "ask the duck" as Richard Deeming suggested on Tuesday.
I just find the syntax more awkward that I should. I really only have done this style of program in VB6 and not VB.Net, C# is preferred for this kind of job but I can't use it as the end customer only has a VB kiddie (who I bet wears a base ball cap backwards, doesn't believe in belts & says "Dude" every five minutes). I am suitably humbled by asking the most obvious questions & offer thanks to CPallini & Griff (sorry!!!)
|
|
|
|
|
You didn't read the warning at the top of the file -
Option Suspicious
speramus in juniperus
|
|
|
|
|
What's funny back in my C dos days I had a header file that was used for debugging hardware called
Whiskey mostly as It was easy to spot #include "Whiskey" (and yes before you ask it had a function called Soda!)
|
|
|
|
|
Zerothly, it is a rather amusing show on the Home Service.
What got me was the following choice, you may have one of these:
- Miley Cyrus as your daughter, or
- Bono as your dad.
It's a hard call.
speramus in juniperus
|
|
|
|
|
No brainer: Bono.
At least when he dies, you stand to inherit a fortune.
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
And Miley Cyrus is just going to wreck your.... eh, never mind. Just remebered: This is the Lounge, not the Soapbox!
Anything that is unrelated to elephants is irrelephant Anonymous ----- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944 ----- I'd just like a chance to prove that money can't make me happy. Me, all the time
|
|
|
|
|
Wise choice...
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
I'm not sure, you'd have to put up with Bonio's sanctimonious drivel. At least with Miley there's *something* to look at...
speramus in juniperus
|
|
|
|
|
Nagy Vilmos wrote: At least with Miley there's *something* to look at...
...who is your daughter, and all the boys are lusting over...
And you got even a tiny amount "excited" that would be just horrible!
As your daughter, it's a lose/lose situation.
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
OriginalGriff wrote: ...who is your daughter, and all the boys are lusting over...
Well, it's not such a big deal to everybody;
-What's the definition of an Arkansas virgin?
-A girl that can run faster than her brothers!
C'mon Ollie - let's move to the Soapbox after all...
Anything that is unrelated to elephants is irrelephant Anonymous ----- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944 ----- I'd just like a chance to prove that money can't make me happy. Me, all the time
|
|
|
|
|
Meh, she'll be working long after I'm a doddery old fool and so the money keeps coming in. Bonio is finished once Larry hangs up his sticks.
speramus in juniperus
|
|
|
|
|
What's wrong with Bono ?
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
Do not feed the troll ! - Common proverb
|
|
|
|