Our server costs ~$56 per month to run. Please consider donating or becoming a Patron to help keep the site running. Help us gain new members by following us on Twitter and liking our page on Facebook!
I've recently started to learn C#. I had to do it on the university. So, my first program in C# is a Tic-Tac-Toe game, which you can see here.
Overall, I'd say I don't see what people mean when they say JavaScript sucks. C# seems about as confusing.
Why the hell does "pictureBox.createGraphics()" work on Windows, but fail silently on Linux? It took me hours to figure out what's going on. Why do multi-dimensional arrays have different syntax than in other programming languages? I mean, in other languages, the syntax makes it obvious that a 2-dimensional array is an array of arrays. C#... I don't know what's going on there, but it's definitely confusing and takes time to get used to. Why does the receiver of the "click" event have to receive "System.EventArgs" and then cast it to "System.Windows.Forms.MouseEventArgs" to receive the coordinates of the click? Why not receive "System.Windows.Forms.MouseEventArgs" in the first place? Why the hell do you need to declare a "Random" object to use a random generator? Why the hell does a single call to "pictureBox.Refresh()" appear to sometimes generate one "paint" event, and sometimes two or more of them? It took me hours to figure out what's going on (and I am still not sure, but I have found a fix).
I am not saying I'd know to make a language better than C#, but I don't see how it can be said to be much better than JS.
I've recently started to learn C#. I had to do it on the university. So, my first program in C# is a Tic-Tac-Toe game, which you can see here.
Overall, I'd say I don't see what people mean when they say JavaScript sucks. C# seems about as confusing.
Why the hell does "pictureBox.createGraphics()" work on Windows, but fail silently on Linux? It took me hours to figure out what's going on. Why do multi-dimensional arrays have different syntax than in other programming languages? I mean, in other languages, the syntax makes it obvious that a 2-dimensional array is an array of arrays. C#... I don't know what's going on there, but it's definitely confusing and takes time to get used to. Why does the receiver of the "click" event have to receive "System.EventArgs" and then cast it to "System.Windows.Forms.MouseEventArgs" to receive the coordinates of the click? Why not receive "System.Windows.Forms.MouseEventArgs" in the first place? Why the hell do you need to declare a "Random" object to use a random generator? Why the hell does a single call to "pictureBox.Refresh()" appear to sometimes generate one "paint" event, and sometimes two or more of them? It took me hours to figure out what's going on (and I am still not sure, but I have found a fix).
I am not saying I'd know to make a language better than C#, but I don't see how it can be said to be much better than JS.
Another thing, fanboys preferences aside you will know to use the proper language for the target application. When I was 9 my dad offered me a commodore 64k, whooping 64 Kb of RAM, no disk except for tapes, the same you could hear music. I made a sprite bouncing on the screen edges. A lot of GOTOs etc. Ah fond memories.
Imho C# is more business and database oriented. C/C++ gives tou more power into the hardware, including graphics, but you need more care about memory managements. Segfaults and leakage are a buggy problem to solve if you don't plan right.
(January 21, 2020 at 2:09 pm)LastPoet Wrote: C and C++ , they give you the versatility you want and even allow some asm if you need to go there.
Most of the C and C++ compiler indeed allow including assembly code into C++, but Assembly language compilers used by C and C++ compilers tend to be made with speed in mind, rather than being user-friendly. GNU Assembler (that GCC and CLANG use), if you ask me, really sucks. It takes hours to make an already-working 100-lines-long program, that compiles with FlatAssembler, compile with GNU Assembler, if you are not familiar with its caveats. Here is an example of that.
In my opinion, FlatAssembler is by far the best assembly language compiler. It also comes with its own IDE on Windows, and it's incredibly easy to use. And the error messages it outputs are a hell lot more helpful than the error messages that GNU Assembler outputs. Microsoft Assembler is also usable, but it's not nearly as good as FlatAssembler is. FlatAssembler comes with a Turing-complete and an incredibly easy to use preprocessor, it's often possible to precalculate the results using the preprocessor and only output them in Assembly.