|
|
I don't know C# well enough to offer many opinions, but it looks good to me unless you need to manage memory.
But C# seems to be very popular on this site! It, and web-related stuff, seem to account for the majority of articles and questions.
|
|
|
|
|
An interesting discussion ! I wonder if we are confounding two different criteria: popular vs. fashionable ?
imho, the cross-platform millstone pushes people to use ... make more code with ... weird flavors (to me), like Python.
JavaScript (nee EcmaScript), a post hoc misnamed lowly scripting language, became Cinderella at the Browser Ball as a default, a compromise between ruthless competitors.
«One day it will have to be officially admitted that what we have christened reality is an even greater illusion than the world of dreams.» Salvador Dali
|
|
|
|
|
My $0.02: Is your question really why isn't C# number 1? I think it is very popular. I also think the so-called surveys are probably skewed somewhat towards website development. With more and more applications moving to the Internet and DYI frameworks and such popping up, there is more emphasis on other languages for those developers. Read Javascript. People want to run stuff on other servers. Methinks that the MS push was for developers to write C# applications and run them on Windows servers in Azure. Then, they discovered that many of the servers on Azure were Linux. Same servers would run on AWS, maybe for less $. So, how to make these companies stay within the Microsoft ecosystem? They seem to be working hard on stuff like Blazor and Typescript to push ahead and, I suspect, this will also push C#.
We are looking at Blazor for an IoT application via Oqtane (an application framework based on Blazor). It has many warts and bugs in V1. Open source project with limited number of developers. I suspect that we may be trying to fit a round peg into a square hole but I want to pursue it and learn some stuff.
If you can keep your head while those about you are losing theirs, perhaps you don't understand the situation.
|
|
|
|
|
In my own experience the reason it is not too popular are the following:
1) Platform. Most features are Windows specific. It builds heavily on the .NET framework which is complete only on Windows. C++ with QT is just as platform independent.
1bis) Platform. Most devs today work either on web based stuff or on embedded (as in Renesas, ATMel and other) stuff. On the former there are more widespread tools, on the latter you have 128 kb of RAM and 2 MB of flash with stringent real time issues, g'luck with C#.
2) .NET framework is not that great. It requires heavy installation on the target and has backward compatibility issues.
3) .NET has terrible documentation, mostly autogenerated. The learning curve is steep and the MS way is to keep changing stuff so once you master it you're already outdated and have to spend money and time again to regain mastery - which will be outdated by the time you reach it.
4) Performance. No matter what the fanbois say, C/C++ is faster and uses less memory, epsecially because C/C++ developers are forced to know what they are doing instead of going commando with memory usage.
5) Security. C# software is perceived as much more likely to be reverse engineered through the generated ILASM than software decompiled from binary. Wether this is true or not it (I'm not so sure it is actually any easier) in my experience it has been one of the most common reasons for the language to be vetoed by the customers.
GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
because it's an MS product.
|
|
|
|
|
cue: sound of Alexander cutting the Gordian Knot
«One day it will have to be officially admitted that what we have christened reality is an even greater illusion than the world of dreams.» Salvador Dali
|
|
|
|
|
The first correct (IMO) answer
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Android and IOS.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
Never underestimate the power of the "anything but Microsoft" group.
There's a lot of butthurt people who are still convinced the Microsoft of 2020 is the same as the Microsoft of 1997.
|
|
|
|
|
It's too old now. Still my current go-to language, but it's been twenty years.
|
|
|
|
|
Takes me 20 years to learn a language!
Thank you to anyone taking the time to read my posts.
|
|
|
|
|
Using one of Microsoft's user-friendly Web wrappers, pull the text from a 404 page.
EG: Use WebClient / HttpClient / Etc to pull the
Do not try and find the page. That’s impossible. Instead only try to realise the truth text from https://www.codeproject.com/woof/index.aspx[^]
To follow best practices, only use exceptions when there is an error you are not expecting.
I'm all for C#, but it does have its issues.
-= Reelix =-
|
|
|
|
|
Part II of the cutting of my programming teeth was in the video game world, using C++, where the rule was that exceptions are very much last-resort, only for events that should not happen and are generally unrecoverable, at least without some kind of restart.
One thing I have often found difficult in C# is trying to avoid exceptions. Even when I have tried to do exceptions properly and catch the correct type etc., I find the program gets worse, not better, because, without looking up every single API call, you never know what exceptions might be thrown. Addiction recovery begins with admission so I will now admit here that I usually end with a catch( Exception ) {} .
To me, in a language, it is as if you need one of two things: either a slimline composite return type that encapsulates any return value and also some kind of error indication (I know - dangerously close to the error return codes of old Win32 programming); or you need two basic types of exception - real ones that should ideally never happen, and a more everyday exception meaning, "Something has gone wrong in my code so don't continue using this value I am about to return to you."
Thank you to anyone taking the time to read my posts.
|
|
|
|
|
why isn't Microsoft more popular?
- C# is a feature language. they constantly add new features. although this seems the only way for a language, for me it's the least preferable. i adore languages that have a mission to fulfill and that's it. the creators of those languages had to make compromises upfront. C (portable assembly) is one such language. LISP, Lua, Go, Component Pascal, TCL, FORTH... all small languages.
- i don't know if this is 100% true, but i bet that C#'s philosophy at the time of it's inception, was same as Java's. only OOP is good, everything else is inferior. for me that's like what Hitler used to preach.
I fear not the man who has practiced 10,000 kicks once, but I fear the man who has practiced one kick 10,000 times.
Bruce Lee
|
|
|
|
|
Don't they continually add to C++? After a few years break, I recently returned to C++ and could barely read what I was seeing.
There's truth in what you say and obviously you have an absolute right to your opinion but I honestly think some people justifiably decided to hate Microsoft in the late 90s and have never looked again.
Thank you to anyone taking the time to read my posts.
|
|
|
|
|
that is a huge problem and i can't understand why it is happening. imagine you know C++, JavaScript and say Rust. you work at a company. large scale project that involves all three languages or at least two.
6 years latter you leave this company and go to work on a fresh new project at a new company. once again it involves C++, JS and Rust or at least two of them.
so now, because there were C++ x20 and C++ 2023, ECMAScript 2019..2025 and Rust 3.x 4.x and the newest Rust 2025 (they will change it to some other naming version) you don't know any of the languages you have worked with for the last 6 years in continuation.
a common book on good programming practices is on average 400-500 pages, but the core stuff would be 200 pages. those good programming practices that will make a competitive programmer write better code in FORTRAN and COBOL that a beginner in the safest programming langue in the world.
how do we get from 200 pages of good programming advice to a stream of a dozen languages that endlessly evolve every year?
"justifiably decided to hate Microsoft in the late 90s and have never looked again."
C# was designed by Anders Hejlsberg of Borland. the creator of Turbo Pascal and Delphi. Microsoft destroyed Borland and many many other companies so they can give away money for charity?
instead of giving away money for charity they could have taken away less from other companies.
nothing i say is against you or your opinion. it is only my opinion. i don't like C# because it is class oriented and because it is from Microsoft.
|
|
|
|
|
that's a good question, I still use it quite often in my work. I'm working on my own streaming service right now. I found useful info about streaming service like netflix here and decided to give it a try. This article could be useful for beginners.
modified 11-Sep-20 3:51am.
|
|
|
|
|
I think there's a few reasons.
1) In VS, it's a go to language for desktop development, yes and sorry, there are tens of thousands of those in use every day. No need for cross platform, ever. While it's still a substantial market, it has been eclipsed by cross platform stuff. I know it's fully capable of that, but you start to lose the advantage of the language in a hurry.
2) To my first case point above, there's also a split between vb.net and C# that dilutes the usage. (Fire away!) Being bilingual, those translations back and forth are pretty easy in the .net environment. Yes, I know the differences but over the years there's a lot of parity and you may never hit a wall in vb.net that is solved in C# in real world apps.
3) Without a good reason, you're not going to move from C/C++ to C#. You might if find yourself in a RAD desktop scenario, but you're probably not chasing that world if it's out of your comfort zone.
4) Programming has matured some into more of a profession. Your eye doctor doesn't see some new ortho procedure and think; "hey, I'll be an orthopedist". I still glance at the newest languages, but it's not the 80's or 90's and having time to play with a massive language isn't a hobby anymore.
The be all, end all, one size fits all theory (Java,lmao) hasn't really panned out well. Languages are tools that have their best use. You can put a screw in with a hammer, but it's liable not to be pretty.
|
|
|
|
|
I believe that there are too many languages available for any one language to become the number #1 language in use.
Though I am completely fluent in C# and have built quite a few C# applications over the years, I still prefer VB.NET for all my own development endeavors. This comes from my years as a DBase\FoxBase\Clipper developer in the late 1980s and 1990s.
One cannot also assume that surveys are actually are a reflection of popularity for any one language as all surveys have built in biases. As my wife has always told me, marketing and surveys is all about what answer(s) you want to obtain and then developing surveys to attain them.
Nonetheless, as some commenters here have said, C# cannot compete with those areas where C\C++ must be used and\or is preferred. And nor can it compete with the many niche languages that have popped up over the years that have very loyal proponents, even though C# can do most if not all of what these languages provide.
You also still have a lot of Microsoft haters out there who would never give a Microsoft product a legitimate chance.
But do not despair, C# and VB.NET will be around for some time to come...
Steve Naidamast
Sr. Software Engineer
Black Falcon Software, Inc.
blackfalconsoftware@outlook.com
|
|
|
|
|
It is a (mostly) general language, but best suited to app development, there is a whole world of development that C#/net can't touch or has no part of.
|
|
|
|
|
I think there's a lot of great reasons here that focus on language alone, and a handful that talk about how software is released once it leaves the IDE. While Azure has implemented a lot of nifty features to make deployment easier, to me the biggest draw back is the release and management of applications in Prod.
Working in a number of FinTech companies, they used C# but only in very limited ways.
Who wants to support IIS servers and deal with the underlying Windows server? It's a nightmare. It took a long time to get decent config management tools to work with Windows. While linux goes bad too, patching issues and system failures feel more severe on Windows server. For the majority of applications especially anything customer facing Java rules the roost. I'm not thrilled about Java / Tomcat but I rather support that then anything C#.
I've never seen a .net core deployment in the wild, though I would love for things to go that way. I've thought about specializing in that area to assist orgs trying to accomplish that but definitely a lot of sharp edges to consider. The horror stories seem to end in a full stop not compatible not supported by Microsoft.
|
|
|
|
|
I like C#, but it is not really cross-platform, requiring some time to get changes ported to Linux, which are always missing some libraries, and I have no idea if it is supported on Apple machines.
|
|
|
|
|
I am definitively a C# guy, but I generally love programming so I've also learned/used JavaScript, VB.Net, LISP, Python, misc other obscure scripting languages and I am currently taking a C++ class so I can effectively play with some specific SDK's. Learning these languages have each taught me different lessons. There is no correct language, some are just plain easier to deploy in different places. The Microsoft (open source!) .NET 5 gives me some hope that I'll get to use C# more frequently in my future.
I certainly don't understand the Anti-Microsoft groups. In very recent years, MS has been a beacon of what I've always fundamentally believed needed to happen; IE, the dismantling of proprietary platforms and file types so that all things have the potential to interoperate. That is the only path to "thriving" in the next era and the companies (regardless of their size) that continue to live in a "black box" state will someday die if they don't focus on being the "open world" stars instead of the "closed world" wardens.
|
|
|
|
|
It's simple for me...
How much can I trust MSFT to not break their old projects.
We have 20-30 and even 50 year old code, still running in production!
Have you loaded a .NET 1 project and recompiled it lately?
My past experience with MSFT was when they abandoned 16 bit C++ support.
We had to buy a Borland C++ Compiler to compile the MSFT 32 bit C++ (new features),
into 16 bit code which 90% of our "clients" required as their DLL.
Don't get me started on the nightmare we had doing a Mobile Project in C#.
We are starting to embrace C# now that Rider exists.
It's not the language, it's the ecosystem the language ends up requiring.
Both for compiling and for running!
|
|
|
|
|