Free Republic
Browse · Search
General/Chat
Topics · Post Article

To: discostu

“whose entire professional career has been in C#”

Doesn’t c# run slower? Also I’d say that anytime you use new or malloc, you’d better check for a null result.


29 posted on 07/20/2024 10:32:13 AM PDT by cymbeline (we saw men break out of a concentration camp.”)
[ Post Reply | Private Reply | To 17 | View Replies ]


To: cymbeline
Doesn’t C# run slower?

Not necessarily. The C# Just-in-time translation is remarkably efficient.

Yes, I have done timing tests on some complex algorithms that were implemented in both C# and C++. They ran at approximately the same rate.

I would say one had better check for a null pointer anytime a class pointer gets passed along to another method. Then provide some reasonable error message and a suitable fallback that does not cause a crash.

That is pretty hard to do and even harder to test and see if it works. That is why it is seldom done.

34 posted on 07/20/2024 11:38:49 AM PDT by flamberge (A storm is coming)
[ Post Reply | Private Reply | To 29 | View Replies ]

Free Republic
Browse · Search
General/Chat
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson