• Your C++ preferences?
    58 replies, posted
[QUOTE=codetorex;41603335]I am agree it is a preference, but I has the standing point about "people that makes professional software prefers to use C++ more than C#" and I am trying to investigate their reasons for this. ... By calling "database skin" I meant web development and GUI based apps that heavily relies on databases. And the software you are listed maybe made in C++ but my point is, it is easier to made them with C#. Because .net framework and visual studio just supports superior support on GUI and some stuff on windows. [/QUOTE] It's not really fair of you to first agree it's a preference, just to label everybody using C# as "non-professionals" as the very next thing you say. Despite what you said in the other paragraph about database clients being true, I find it irrelevant. Don't tell me there are no UI libraries/frameworks out there for C++. Even if I've never written any real thing in C++, I can safely say there are some. I think you can make such an application as easily in C# as easily in C++. [QUOTE=codetorex;41603335]Ngen is just a cache for avoiding JIT recompiling everytime you trying to run a program. It doesn't produces any executable that can run on platforms that doesn't have .net.[/QUOTE] I bet there's some lonely raw-C# compiler that works cross-platforms. You're talking about .NET C#, not about C# itself. You can always make your [url=[url=http://www.mono-project.com/Main_Page]own framework for C# that'd be working throughout platforms[/url] if you really wanted to. Microsoft made .NET Framework, and as far as I'm concerned, they came up with C# as well. It'd be very un-Microsoft-ish and potentially counter-productive if they made it open source and cross-platform. [QUOTE=codetorex;41603335]Yeah you can allocate unmanaged memory and use even pointers, but why use C# then, these are only good things about C# which makes it "easy" also which kills its performance.[/QUOTE] Implicit memory management is one of the best things on C# (at least for me) and it indeed makes the language way easier for beginners to learn, as opposed to other languages that lack this feature - such as C++. If you really wanted to use your own memory management in a C# application, I think you could find a way to disable the default and use your own, although I personally doubt it'd achieve higher performance rates than the one built by tens of developers who did it for money as a part of their job at Microsoft. [QUOTE=codetorex;41603335]Packers and code fuckers isn't a solution but more problem. They tend to fuck binaries beyond usable. And still they can be decompilable. Only you have to rename stuff. But you can still see the algorithms easier than just reading x86 assembly. And reading assembly is not an easy task, because it needs lots of experience which is something most programmers doesn't have. Also you have more software protecting options that works on native binaries.[/QUOTE] I agree that the MSIL makes any .NET/CLR application a lot easier to reverse engineer, but.. what's the point of obfuscating your code? No matter what you do, there will always be a way to reverse engineer it, no matter what kind of obfuscator will be used. People will always break through your license key checks or whatever is it that you're hiding, just that it'll take them a little longer if the MSIL disassembler is not available for their subject executable. [QUOTE=codetorex;41603335]About the libraries, thats the point. When you remove all libraries from C++ you can still compile a working executable and you can do anything. But when you remove .net framework from C# it compiles to a bytecode that can't run anywhere natively. Thats what I meant by scripting language. When both doesn't had any libraries at all, C++ will have more features than C# and still will be preferred by professionals.[/QUOTE] .NET was designed to work with C#, and .NET was made as a commercial framework targeted for usage on Windows. Regardless of your opinion on Microsoft, it'd be a stupid move from their side if they made it open source or open platform. Well - in that case, .NET wouldn't be what it is now. I am using C# because I found it easier to start with than with C++. I am using C# because I don't really have a need to target any other platforms. Microsoft made .NET C# to allow developers to make rich Windows Forms / Presentation Foundation user-friendly applications [i]faster and easier[/i]. If I can judge, I think it fits it's purpose well. Choosing a programming language is a matter of personal preference and a matter of the application you're developing. I believe C# is great choice for internal applications, such as those for financial companies. Just because there aren't many games written in C# doesn't mean it's not possible - I don't think Terraria is any huge failure. We could argue indefinitely about this subject. I'm happy that you at least bothered to elaborate on your opinion, rather than just being an average Facepunch troll.
[QUOTE=codetorex;41603335]I am agree it is a preference, but I has the standing point about "people that makes professional software prefers to use C++ more than C#" and I am trying to investigate their reasons for this. Other than that; Ngen is just a cache for avoiding JIT recompiling everytime you trying to run a program. It doesn't produces any executable that can run on platforms that doesn't have .net.[/quote] It still generates platform-specific native code, you just need the right runtime to invoke it. (Under Mono, it actually generates a native .so file alongside the .exe) [quote] Yeah you can allocate unmanaged memory and use even pointers, but why use C# then, these are only good things about C# which makes it "easy" also which kills its performance. [/quote] Unless I'm reading this wrong, you're saying that allocating unmanaged memory and using pointers makes C# slower? Because I can tell you from experience that tight math loops can very much benefit from pinning an array and operating directly on the pointer. Or are you saying that there's no point in all the other managed stuff C# has? Because that would be wrong too. 90% of your code isn't time sensitive and will never be your bottleneck. All of that extra stuff makes your life easier for that 90%. [quote] By calling "database skin" I meant web development and GUI based apps that heavily relies on databases. And the software you are listed maybe made in C++ but my point is, it is easier to made them with C#. Because .net framework and visual studio just supports superior support on GUI and some stuff on windows. [/quote] Great, so C# is better at that stuff. It's good at a lot of other things too. [quote] Packers and code fuckers isn't a solution but more problem. They tend to fuck binaries beyond usable. And still they can be decompilable. Only you have to rename stuff. But you can still see the algorithms easier than just reading x86 assembly. And reading assembly is not an easy task, because it needs lots of experience which is something most programmers doesn't have. Also you have more software protecting options that works on native binaries. [/quote] This one time I tried looking at a closed-source, obfuscated C# project. There was a blank namespace that had probably 400 classes in it with fragments of code spread out everywhere. I don't think any sane person would go near that. But yes, in general, less people know how to read x86 assembly, and CIL can be directly translated to any CLI-based language which makes it much easier to read. [quote] About the libraries, thats the point. When you remove all libraries from C++ you can still compile a working executable and you can do anything. But when you remove .net framework from C# it compiles to a bytecode that can't run anywhere natively. Thats what I meant by scripting language. When both doesn't had any libraries at all, C++ will have more features than C# and still will be preferred by professionals.[/QUOTE] When you remove the .NET framework from C#, you can use Mono or Portable.NET to interpret the CIL. And you can write your own standard library if you wanted to, .NET's C# compiler has the [url=http://msdn.microsoft.com/en-us/library/fa13yay7(v=vs.71).aspx]/nostdlib[/url] flag and Mono's compiler has the equivalent --nostdlib option. Also, if you're trying to say that the .NET/Mono dependency is not a good thing, realize that [b]most[/b] software will have at least a few dependencies. Most games and a lot of other C++ applications on Windows require a slightly different VC++ redistributable. Hell, I've got 22 different versions installed on my desktop right now. Windows ships with .NET, Ubuntu and a handful of other distros ship with Mono. And if we're speaking realistically here, no one is actually going to use C++ without some kind of standard library, and no one is going to use C# without the BCL. A lot of what makes C# so great is it's amazing standard library that lets you do things like LINQ, dynamic, and async/await. [editline]26th July 2013[/editline] [QUOTE=khuba;41603902].NET was designed to work with C#, and .NET was made as a commercial framework targeted for usage on Windows. Regardless of your opinion on Microsoft, it'd be a stupid move from their side if they made it open source or open platform. Well - in that case, .NET wouldn't be what it is now.[/QUOTE] Mono is the standard CLR implementation on non-Windows platforms, which works on Linux, OS X, iOS, Android, Wii, and a variety of other OSs. Microsoft has already "released" the source code of the .NET BCL for reference (not for redistribution or reuse), and they've open-sourced a few of their software stacks like ASP.NET MVC4, WebPages, Entity Framework, Razor, and their System.Json implementation, which Mono took in. I haven't looked into it much, but it looks like they've recently opened up a lot of F# as well...
So I think the resulting clusterfuck between you all proves my point that C++ isn't better than C# in every way. Your statement is highly debatable, vague and pretty much untrue, which is why I only bothered to type "Bullshit.". There are plenty of things C# will do better and other things C++ will do better, which is why there are so many languages around. I'd do point-by-point destruction of your posts but others did it enough already for me to bother.
Whatever you say guys; it's not going to change the reality. Which is [B]C++ used by every AAA game title and software[/B] which is my standing point as I already mentioned. And my posts may wrong and maybe untrue or debatable because what I just write is answers of a question "Why I prefer C++" from my perspective but you can [B]ask those other professionals why they preferring C++[/B] over any other language including C#. There was times I preferred C#, and when I asked why to myself, I answered "because it has .net framework which makes it easy to start a project with gui, easy to design gui, and makes software development easier overall", I like it for it being easy. This is my reason but some guy called this as "bullshit" I am asking him how he chooses which language to go on a project and how he chooses. When I ask myself why C++ is not easy, I answered myself "because it doesn't have this standardized library. you have to use bunch of different libraries together. which will cause some inconsistencies and I don't like it but its not a lack of features in language itself" this is my reason. And this is how I pulled "Actually c++ is stronger than c# in all ways but c# had the .net backing it which makes it easy to use." sentence out of my ass between farts. I am still insisting on this sentence. [B]Remove the framework and C# doesn't have any pros over C++. While C++ has more.[/B] And it is easy to debate with people who prefers blue over red, and when you ask the reasons you can all ways name them as "Bullshit" because their reasons and perspective not matching with yours but it is not constructive. But telling why you prefer red over blue would be a good starting point for exchanging perspectives and will let other people to see from your perspective. And currently even lets say c# can do everything c++ can do, what I see in companies I worked and informations I collected; it is currently language of code monkeys and software produced with c# is never gets released, all of them are crappy and used just internally or just used on server-side. I never encountered with a software that everyone uses made with c#. I don't say they not exist, but I personally never encountered. So yeah because of this, obfuscation is not even needed. Why would you obfuscate it if you not going to release it right :v: [B]Everything you can name is implemented in C++ or C internally. [/B] And yeah you can dllimport stuff [B]made with c++[/B]. Even some language with "easiness" of c# needed, people preferred Java over it. ( I am talking about android platform ). Debate is unnecessary, because it doesn't going to change anything for me or you. It's preference and you are debating me with my preferences and my reasons. Bullshit or not my reasons have a standing ground based on reality. And if you want a dream job, you going to use C++ at your workplace. What I see is C# is only used for web development and crappy software, unless this is your dream job. Last but not least Just ask yourself why professionals prefer C++, and ask yourself why android based on c++ and has the Java on its side but not C#. You will give answers yourself. And I will still be happy to hear out why and when you prefer C++ or C# without debating my or your reasons.
I'm unsure in what state C# was when Android began, maybe they also didn't choose it for patent concerns from Microsoft. Although Oracle tried to fuck Google in the ass over Java. Android is also not based on C++. I believe most userland stuff is written in Java (though I might be wrong, I have no facts). Some libraries might use C++ and their Chromium-based browser probably as well, but the lower-level stuff like Bionic and Linux are (mostly) C. On a site-note, you'll also be unable to use a lot of C++ programs if you don't want to use its standard library. The same for the even lower-level C programming language. The CLR (does that include .NET? I don't know much about the infrastructure) is larger, but it also does more. Anyway, PHP is widely used for web-server applications and I'm sure most can agree that PHP is not a great programming language. Popularity does not mean something is good, although in some cases it might be an indicator. But personally I don't really care. If you want to do this, why should I stop you. I wouldn't stop you if you used assembly or Fortran or whatever. You seem to have made your mind up and hopefully know what work lies ahead of you. Have fun, that's what matters most. But I find the claim that you can do stuff in one language that you cannot do in another wonky. The statement of both being turing complete was serious. Sure, some things might be easier in the one, but other will be easier in the other language. And some things might look more expressive in the one than the other language, but you can still do anything in the one language that you can do in the other.
1) C# has a bunch of awesome language features that have nothing to do with the BCL. Properties, reflection, runtime generics, dynamic, async/await. All things that are not language features in C++. Instead of just saying "C++ has more", give me some actual examples and I'll drop this point. 2) Popularity doesn't necessarily make something better. Great, so most AAA engines and titles are written in C++. Look at all the indie titles made with XNA/MonoGame. Also, FrostBite 2/3, Unity, Dunia (Far Cry 2/3), Glacier 2 (Hitman: Absolution), all use C# in some way, whether it's for scripting or for tools. 3) All those engines I just mentioned? They ship with either a copy of Mono running internally or with all their C#-based tools. When you say "it is currently language of code monkeys and software produced with c# is never gets released, all of them are crappy and used just internally or just used on server-side" you're seriously generalizing. Are you so certain that Bastion, Terraria, and FEZ, among others, are shitty pieces of software only used internally? 4) Most of your post is anecdotal evidence and absolute statements without any reasons. Big libraries are most often written in C (or at least expose a C API) because every other language out there has bindings to C. That doesn't make it any better. Before C, I believe Fortran was the "standard" langauge to write things in. Even C has Fortran bindings. People didn't just immediately jump ship to C, because all of their code was already in Fortran. 5) That whole thing about Android using Java... IIRC Android formed from Google attempting to standardize development for phones (all of which were dumphones at the time). The phones at the time that had some sort of programmability all had J2ME installed, so it would be natural that they continue to use Java. Ironically enough, having chosen a fairly "open" platform, Oracle still managed to successfully sue them. 6) We're not calling you out on saying "because it has .net framework which makes it easy to start a project with gui, easy to design gui, and makes software development easier overall". We're calling you out on the very pointed, almost flame-baiting statements without listing any examples: "C# is just used for making skins to databases" "But when you remove framework from C# its nothing more than a scripting language." "C++ will have more features than C# and still will be preferred by professionals." "it is currently language of code monkeys and software produced with c# is never gets released, all of them are crappy and used just internally or just used on server-side. I never encountered with a software that everyone uses made with c#." "C# is only used for web development and crappy software" [editline]26th July 2013[/editline] [QUOTE=ZeekyHBomb;41608710]On a site-note, you'll also be unable to use a lot of C++ programs if you don't want to use its standard library. The same for the even lower-level C programming language. The CLR (does that include .NET? I don't know much about the infrastructure) is larger, but it also does more.[/QUOTE] The CLR (Common Langauge Runtime) is the C# equivalent of Java's JVM. The BCL (Base Class Library) is the C# equivalent of Java's JCL (Java Class Library). The .NET framework is the CLR + BCL + compilers, tools, and libraries that Microsoft decided to include.
[QUOTE=robmaister12;41608758]1) C# has a bunch of awesome language features that have nothing to do with the BCL. Properties, reflection, runtime generics, dynamic, async/await. All things that are not language features in C++. Instead of just saying "C++ has more", give me some actual examples and I'll drop this point. 2) Popularity doesn't necessarily make something better. Great, so most AAA engines and titles are written in C++. Look at all the indie titles made with XNA/MonoGame. Also, FrostBite 2/3, Unity, Dunia (Far Cry 2/3), Glacier 2 (Hitman: Absolution), all use C# in some way, whether it's for scripting or for tools. 3) All those engines I just mentioned? They ship with either a copy of Mono running internally or with all their C#-based tools. When you say "it is currently language of code monkeys and software produced with c# is never gets released, all of them are crappy and used just internally or just used on server-side" you're seriously generalizing. Are you so certain that Bastion, Terraria, and FEZ, among others, are shitty pieces of software only used internally? 4) Most of your post is anecdotal evidence and absolute statements without any reasons. Big libraries are most often written in C (or at least expose a C API) because every other language out there has bindings to C. That doesn't make it any better. Before C, I believe Fortran was the "standard" langauge to write things in. Even C has Fortran bindings. People didn't just immediately jump ship to C, because all of their code was already in Fortran. 5) That whole thing about Android using Java... IIRC Android formed from Google attempting to standardize development for phones (all of which were dumphones at the time). The phones at the time that had some sort of programmability all had J2ME installed, so it would be natural that they continue to use Java. Ironically enough, having chosen a fairly "open" platform, Oracle still managed to successfully sue them. 6) We're not calling you out on saying "because it has .net framework which makes it easy to start a project with gui, easy to design gui, and makes software development easier overall". We're calling you out on the very pointed, almost flame-baiting statements without listing any examples: "C# is just used for making skins to databases" "But when you remove framework from C# its nothing more than a scripting language." "C++ will have more features than C# and still will be preferred by professionals." "it is currently language of code monkeys and software produced with c# is never gets released, all of them are crappy and used just internally or just used on server-side. I never encountered with a software that everyone uses made with c#." "C# is only used for web development and crappy software" [editline]26th July 2013[/editline] The CLR (Common Langauge Runtime) is the C# equivalent of Java's JVM. The BCL (Base Class Library) is the C# equivalent of Java's JCL (Java Class Library). The .NET framework is the CLR + BCL + compilers, tools, and libraries that Microsoft decided to include.[/QUOTE] Thank you a lot, it is very informative and felt friendly. I knew GUI and some tools of games were made with C# which doesn't contradicts with my statement about "if performance is not issue and going to make a GUI, it is easier to go with c#". "Properties, reflection, runtime generics, dynamic, async/await" these awesome tools are available because "scripting-like" nature of C# but these things are still mostly slower things. While C# carrying its object type information in its binary ( which makes it so easy to decompile, and I don't have experience with using reflection and dynamics in obfuscated code but I assume you can't easily do that ), C++ compiled executable doesn't carries information about types and classes thats why these stuff is not available. Because C++ is made in a way while having speed in mind. But you are right sometimes I miss properties and reflection and I know with flexibility of C++ I can add these features. And an informative thing, C# properties are like syntactic sugars. They are compiled as get_X, set_X functions internally IIRC. Still C++ is closer to steel, low level and high performance language makes me feel better about what I am doing. At least these are what I thought. For 3) they are not shitty software but they doesn't requires much performance to run. And they made in c# because it is easy (or their programmers learned programming in c#). So they almost perfectly fits in [I]my[/I] rule for programming environment choosing. But I would still make them in C++ because no GUI involvement. But whenever I found a software that made with c#, it felt like crappy. And I don't remember any notable software made with C#. But yeah it used as scripting tool or GUI parts in some notable software but still core of everything made with either C or C++. I am sorry if I generalized too much but there is saying if something works more than % 60 of time, it works all the time :v: Those are what I saw, maybe I only encountered with bad examples everytime, I don't know. 6) You are right, I have strong affection and love to C++ and C# feels like street prostitute that Microsoft pimps, even if it has more beauty in some ways. Love doesn't have logic all the time and It may bent my thoughts and maybe I didn't explained well. I am sorry if I offended anyone. Whatever all this debate is loss of precious time and come out reality when gparent called my opinions about blue color over red color as "bullshit" while not showing what he has. When you remove .net from C# its no easier than C++ and has no notable use hahaha :suicide: Now we got work to do...
1) I use UpperCamelCase for Public methods and variables and lowerCamelCase for private variables and methods. I use UpperCamelCase for Classes,structs, enums, etc. 2) I don't use namespaces in most projects. Only if I'm developing a library or have separate "modules" within one application in which case I use UpperCamelCase to name the namespaces. 3) My development style is not very structured and it depends on the project. When developing games, I mostly just experiment and adjust stuff constantly until I get the result I want. 4) Cross Platform compatibility (Android, IOS, Windows, OS X) 5) I do most of my development on/for Windows and I love visual studio, so I usually use MSVC. But I do use MINGW occasionally, I don't have a problem using either one. 6) Hard to say because both are very important and can be related to each other 7) The only prefixes I do are with private member variables. I name a variable such as int _health, and use Getters/Setters like int GetHealth() and void SetHealth(int val). 8) I've never really "licenced" anything of mine, mainly because I rarely make libraries or distribute source code. I would probably use the zlib license if I released anything important. 9) I name the file with the same name as the class. So I would have a file called Player.h containing a class named Player. I've always used .h instead of .hpp for some reason. 10) I don't really have a maximum name length. Sometimes I require a lengthy name for a class, but usually I keep class names simple and short so they are easy to remember. 11) One of the most important things in a library is the documentation. I prefer a Wiki, but a machine generated documentation is still good as long as you write some "Hello World" basics and stuff. 12) I usually just put all my source files in a folder called src and headers in a file called include. Sometimes I have a "deps" folder where I store libraries that my code uses, and a "bin" folder where all the executables (final products) go. As for C++11: I would recommend using it because it makes some things easier as a developer, but the end user won't care if the actual game library is using C++11 internally or not. Just make sure to compile with MSVC occasionally to make sure the library still compiles with MSVC's C++11 support.
[QUOTE=codetorex;41608290]And I will still be happy to hear out why and when you prefer C++ or C# without debating my or your reasons.[/QUOTE] Saying "C++ is better than C# in all aspects if you remove the .NET framework" is hardly an opinion to me, it's you trying to state a fact. Also, you can't just say "Without the .NET framework". That's like saying "C# is better than C++ in every way if you remove the standard library". It's not a fair comparison. There are obviously some advantages to how easy C#'s syntax is and how quickly it lets you develop applications even if you're not a very experienced programmer. Have you ever used LINQ? People who never write C# like to mouth off about how slow it is because they're too stupid to try it, but in the real world the speed differences aren't always that great between LINQ and other approaches. For games though? Probably you'd like to use something else. See, it's all a matter of context. "C++ is generally more used than C# for games because of some specific things it does better than C#" is not the same thing as "C++ is better in every way" because it simply isn't true when you say it that way. All AAA games use C++. Sure. Who cares? That argument is flawed and there's even a fancy latin name to describe that argument type, but I forgot it. Something being used more doesn't make it better than something else. If everybody started using C# tomorrow for their AAA titles, I wouldn't be going around saying "C# is better than C++ in every way!11!" Saying C# has no notable use is ridiculous. It's just you showing your fanboyism. [quote]Love doesn't have logic all the time and It may bent my thoughts and maybe I didn't explained well.[/quote] Well, no, if you use emotion rather than logic in order to justify why you think C++ is better than sliced bread then I can see why your arguments make no sense. EDIT: To put it another way, I'm fairly confident my C# code would be better than your C++ even if you're working with a "high performance low level language" that makes you feel good about yourself.
[QUOTE=gparent;41612864]the truth[/QUOTE] I was about to reply just like you have, but I decided to not bother with somebody who ends a debate with [i]When you remove .net from C# its no easier than C++ and has no notable use hahaha Now we got work to do...[/i], and just rated dumb. I totally agree with everything you said and - if Facepunch had a "hero" rating, I'd give it to you. [img]http://www.facepunch.com/fp/ratings/heart.png[/img]
[QUOTE=gparent;41612864]Saying "C++ is better than C# in all aspects if you remove the .NET framework" is hardly an opinion to me, it's you trying to state a fact. Also, you can't just say "Without the .NET framework". That's like saying "C# is better than C++ in every way if you remove the standard library". It's not a fair comparison. There are obviously some advantages to how easy C#'s syntax is and how quickly it lets you develop applications even if you're not a very experienced programmer. Have you ever used LINQ? People who never write C# like to mouth off about how slow it is because they're too stupid to try it, but in the real world the speed differences aren't always that great between LINQ and other approaches. For games though? Probably you'd like to use something else. See, it's all a matter of context. "C++ is generally more used than C# for games because of some specific things it does better than C#" is not the same thing as "C++ is better in every way" because it simply isn't true when you say it that way. All AAA games use C++. Sure. Who cares? That argument is flawed and there's even a fancy latin name to describe that argument type, but I forgot it. Something being used more doesn't make it better than something else. If everybody started using C# tomorrow for their AAA titles, I wouldn't be going around saying "C# is better than C++ in every way!11!" Saying C# has no notable use is ridiculous. It's just you showing your fanboyism. Well, no, if you use emotion rather than logic in order to justify why you think C++ is better than sliced bread then I can see why your arguments make no sense. EDIT: To put it another way, I'm fairly confident my C# code would be better than your C++ even if you're working with a "high performance low level language" that makes you feel good about yourself.[/QUOTE] You are in straw man fallacy. [url]http://en.wikipedia.org/wiki/Straw_man[/url] My point is "[I]C# is preferred because it is easy to use because that consistent and well documented library backing it, without that library there would be no need for C# and it wouldn't get this popular[/I]". You may agree or not. I said C++ is strong in every way, because it provides freedom of choice. It is flexible, mature language, which used and constantly developed for 30 years. And it is open standard developed by industry professionals. It is closer to steel, low level and provides more speed. This is why it is used in everywhere not because it is popular. Say it anti-virus engines, say it OS kernels, say it 3d engines, game engines , say it hundreds of libraries that you can choose, say it web browsers, all the software you are currently using is made with C++. This is not happened because it is just "popular". And I tried to point out what could be their reasons. And yeah all answers you may get maybe untrue, debatable etc, My reason is speed and native compiling. It is very important for me because when I press the green play button, it generates assembly language, and I can observe how compiler optimized my code and if it is best or not. So I can write better optimized code. And in complex systems small functions called over and over million times, even small overheads stack up for great degradation in performance. These are about why I preferring C++. But who cares right? Yes I love C++, yes I know it sounds like fanboy, but me and lots of people has their reasons for it. At the same time I love C# too. But if it didn't had that library I wouldn't use it while C++ is standing there. These are my reasons and I am sorry if I generalized too much, or my generalization isn't including every reason correctly to its root. My purpose is bringing this easiness to C++. I may succeed or fail, but "internally" I see what can I do, I just going to publicize it by cleaning unimplemented stuff while keeping everything tested and trustable. And I see your narcissistic behaviors like thinking your code is "better" than mine even without seeing it. Seeing others opinions as bullshit. Narcissism at it best. Good luck in life.
the sims 3 is an AAA game and the game itself is written in C# (on top of a c++ engine)
[QUOTE=supersnail11;41619482]the sims 3 is an AAA game and the game itself is written in C# (on top of a c++ engine)[/QUOTE] It is used as a scripting language. What a shame :)
[QUOTE=codetorex;41620169]It is used as a scripting language. What a shame :)[/QUOTE] it is used as a scripting language as much as any mod based on source is scripting
Or a program for an operating system is sripting. The line between scripting languages and native languages is disappearing, if it has not completely disappeared already. For example Python or Lua, which are traditionally scripting languages, can both run stand-alone and there are native compilers available for both. Both Chromium and Firefox include JIT compilation for JavaScript to native code. Likewise, there are interpreters for C and (some of?) C++. Making a scripting language a native language is just a matter of writing a native compiler. Likewise, making a native language a scripting language is just a matter of writing an interpreter. There are languages more suited to the one or the other, but you can implement turing complete languages in turing complete languages (interpretation) or translate turing complete languages into another turing complete language (compilation).
[QUOTE=ZeekyHBomb;41622797]Or a program for an operating system is sripting. The line between scripting languages and native languages is disappearing, if it has not completely disappeared already. For example Python or Lua, which are traditionally scripting languages, can both run stand-alone and there are native compilers available for both. Both Chromium and Firefox include JIT compilation for JavaScript to native code. Likewise, there are interpreters for C and (some of?) C++. Making a scripting language a native language is just a matter of writing a native compiler. Likewise, making a native language a scripting language is just a matter of writing an interpreter. There are languages more suited to the one or the other, but you can implement turing complete languages in turing complete languages (interpretation) or translate turing complete languages into another turing complete language (compilation).[/QUOTE] I am not told something about this, why everyone changing what I said and answering to that changed stuff. 1. C# is preferred because it is easy to use because that consistent and well documented library backing it, without that library there would be no need for C# and it wouldn't get this popular 2. There is no notable software made by C# that everyone uses, even they are exists they are crappy. Even if they are part of bigger system which core of them made with C++, it doesn't contradicts with my first statement. They pick C# because easy to use and library, an it still can be usable as scripting language or GUI tool.
[QUOTE=codetorex;41626061]I am not told something about this, why everyone changing what I said and answering to that changed stuff. 1. C# is preferred because it is easy to use because that consistent and well documented library backing it, without that library there would be no need for C# and it wouldn't get this popular 2. There is no notable software made by C# that everyone uses, even they are exists they are crappy. Even if they are part of bigger system which core of them made with C++, it doesn't contradicts with my first statement. They pick C# because easy to use and library, an it still can be usable as scripting language or GUI tool.[/QUOTE] [URL="http://www.getpaint.net/"]Paint.Net[/URL] [URL="http://code.google.com/p/openpdn/source/browse/#hg%2Fsrc"] Source[/URL] It's not crappy nor does it have a C++ base. [URL="http://www.icsharpcode.net/opensource/sd/"]SharpDevelop[/URL] It's no visual studio but it gets the job done. Also it depends on what you mean by "everyone uses", You'll see a lot of community made tools for various games written completely in C# over other languages.
[QUOTE=codetorex;41616512]You are in straw man fallacy. [URL]http://en.wikipedia.org/wiki/Straw_man[/URL][/QUOTE] A strawman requires that I attack a misrepresentation of a position. A cite your own words, with a bit more context: [QUOTE=codetorex]Which I see a major problem in C++ world. Like people comparing c# with c++. [B]Actually c++ is stronger than c# in all ways[/B] but c# had the .net backing it which makes it [B]easy to use[/B]. [/QUOTE] It looks to me like you're literally claiming C++ is stronger than C# in [I]all[/I] ways, except you seem to claim C# has a bit nicer standard library. Which merely makes it easy to use. [quote=codetorex]But when you remove framework from C# its nothing more than a scripting language.[/quote]This shows a lack of understanding of C#, "scripting" languages and programing in general. C# is definitely much more than just a scripting language. [quote]My point is "[I]C# is preferred because it is easy to use because that consistent and well documented library backing it, without that library there would be no need for C# and it wouldn't get this popular[/I]". You may agree or not.[/quote] I'll actually agree that this is part of the reason C# is preferred. The barrier of entry is low but the language is actually powerful and pretty consistent. That is an example of something that I consider a strong point over C++. [quote]I said C++ is strong in every way, because it provides freedom of choice.[/quote] That's very vague, arguably C# does too. C++ is more flexible to different styles of programming. [quote]It is flexible, mature language, which used and constantly developed for 30 years.[/quote] I'll give you that. If you're careful to follow standards, use a proper compiler and be careful how you code, your programs should reasonably behave as you expect them to. [quote]And it is open standard developed by industry professionals.[/quote] So is C#, you could say. It's not necessarily open in the sense of people all over the world creating it, but the specification is available under ECMA. They are also open sourcing more and more code, although it is still proprietary in nature. [quote] It is closer to steel, low level and provides more speed.[/quote] "provides more speed" is wrong. C# can run faster than C++, it can also run much slower. C++ allows you lower level access to the machine and can be optimized better. But that still relies on the [B]programmer[/B] as its main source of input. There -are- some excellent C# programmers out there, and I often find their code to be as fast as the average C++ program. [quote]all the software you are currently using is made with C++[/quote] Now I find this to be a bit too specific. I actually do use a lot of C++ software on Linux, but I run a significant amount of C in that area and I run a lot of .NET applications on Windows *and* Linux. KeePass is an application I [I]rely[/I] on every day, without it I am completely fucked. But again, you said it yourself, C++ has been around for the past 30 years. C# the past 12. It is normal that more software is made using the language available 18 more years ago than the other. It doesn't speak to the quality of the language itself much. Many people will stick to arguably terrible languages for a very long time (mostly php web devs and vb.net programmers) because they are used to them and they refuse to admit their flaws, or do not wish to try other options to realize these flaws. I respect much more the few programmer I know on IRC who have toyed with multiple languages and can point out in simple words [I]why[/I] one is better or worse than the other at what task. [quote]My reason is speed and native compiling. It is very important for me because when I press the green play button, it generates assembly language, and I can observe how compiler optimized my code and if it is best or not.[/quote] You'll find you can do similar magic with C#. I won't teach you how, though, but a hint is: CIL. Which eventually gets chewed down to CPU instructions, just like C++. [quote]And in complex systems small functions called over and over million times, even small overheads stack up for great degradation in performance.[/quote] Have you ever profiled your code? How did you do it? I'm interested. [quote]These are about why I preferring C++. But who cares right?[/quote] I do, I'm not here to troll. If this is why you code in C++, it's a pretty reasonable argument. [quote]These are my reasons and I am sorry if I generalized too much, or my generalization isn't including every reason correctly to its root. [/quote] My main it was with the blanket C++ > C# statement. When you put it the way you just did, it's a lot better. That being said: [quote]2. There is no notable software made by C# that everyone uses, even they are exists they are crappy.[/quote] This is yet another dumb blanket statement which isn't true. [quote]My purpose is bringing this easiness to C++. [/quote] C++ will always remain hard and syntactically complex. You can't change that. You can only make a library that is consistent, reliable, easy to use, and hard to misuse. [quote]Good luck in life.[/quote] Got a car, an apartment, a degree and multiple job offers as well as a steady job. I'm okay thanks.
[QUOTE]It looks to me like you're literally claiming C++ is stronger than C# in all ways, except you seem to claim C# has a bit nicer standard library. Which merely makes it easy to use.[/QUOTE] Well my first statement were subjective I already acknowledged that, but thanks for agreeing with updated statement. I am happy to find some common ground, still I got some disagreements that I bothering to write because it may helpful to other people for learning something or let them consume some more popcorn :smile: [QUOTE]You'll find you can do similar magic with C#. I won't teach you how, though, but a hint is: CIL. Which eventually gets chewed down to CPU instructions, just like C++.[/QUOTE] Well CIL is not assembly and it is not what running on cpu and you can't control what is CIL and how is interpreted. So optimizing for CIL is pointless while its interpretation could change later. So your argument is invalid. [QUOTE]This shows a lack of understanding of C#, "scripting" languages and programing in general. C# is definitely much more than just a scripting language.[/QUOTE] I am somewhat agree with this because, I am used that word for insulting purposes. But one distinctive feature of scripting languages which makes me don't like them is bytecode. So my definition of scripting language is [I]When a programming language needs some host process to be executed from its bytecode or source code, and a large environment than software itself and some form of VM that needed to be available to run the executable it is a 'Scripting Language'[/I]. You may not agree with my definition nor C# may not just fits right in this definition because of broader usability but if we take account .Net is not designed for being cross-platform and only cross-platform way is using unofficial implementation called Mono, I thought I can say it as an almost scripting language of Windows. Maybe untrue but acceptable. [QUOTE]So is C#, you could say. It's not necessarily open in the sense of people all over the world creating it, but the specification is available under ECMA. They are also open sourcing more and more code, although it is still proprietary in nature.[/QUOTE] ECMA until 2.0. And I wonder how you can contribute to design or future of the language. And being proprietary is damaging its popularity among hackers, which is a theory I will investigate later in this wall of text. [I]2. There is no notable software made by C# that everyone uses, even they are exists they are crappy. [/I] [QUOTE]This is yet another dumb blanket statement which isn't true.[/QUOTE] If this is not true, please feel free to list some. Paint.Net and SharpDevelop are legit claims but I never used them and their marketshare and complexities between their counterparts will reveal the truth. Also they can be considered few exceptions that doesn't enough to break the rule about 'crappy'. I did a web search for double checking what I said and didn't found anything either. And I have theory about this. Because easiness of C# its mostly used for developing internal company specialized software with RAD purposes or server side software for web and most of the time it used by junior level programmers. Because it is 'cheap' to develop software this way and result is obviously 'crappy'. So not much code review is done and people using C# having worser time frames to complete given project. Because project manager thinks it is relatively easy to program in C# and they think they add more juniors, if deadline will not going to meet. So even you are a best c# programmer, under such time constraints you produce crappy code. So it is not a fault in core or design of C# but psychology it creates. It just makes me remember 10 years ago and arguments about VB 6.0. From what I see is C# mostly replaced VB crap, and on the way of replacing PHP. Only if Microsoft could courageous enough to make it fully open standard and source. So it could be used on Linux servers for web development and it would have a lot higher chance to replace PHP that way. But if I have a linux server (which is cheaper obviously) I don't have any choice to use C#. Running c# on mono is not convenient and I wasn't able to run it with latest MVC 4.0. So from this attitude, I am thinking about Microsoft invented this for creating dependency on its own products to create artificial scarcity so they can sell more products. And they didn't killed mono with patent lawsuits when they see it increased C# popularity. I can't blame them nor I am not against Microsoft, but it would be a lot good in this way instead and time spent on Mono would be spend on something else. Hell even it could be replaced Java and Android could pick C# instead of Java and which would lead to a better world. In this context I understand why Richard Stallman is so hardcore about freedom of software. [QUOTE]Have you ever profiled your code? How did you do it? I'm interested.[/QUOTE] I am profiling my C++ code with available profiling tools mostly. And manually checking what assembly generated from my code time time to learn about how compiler optimizes the code, with that I am checking how much clocks they going to take when they got executed on CPU. This describes what being of "closer to steel". So I can check if compiler generated code to correctly using new CPU instruction sets and features. If it doesn't and there is no way to make compiler use them, I have the ability of spraying some assembly to it for forcing it to use those. Which is not I am doing much lately because not everyone knows it nor wants to use it and cross device concerns. But having the ability is important for me and sometimes crucial in some software. On C#, I never needed to do profiling. Because software I created with C# weren't complex enough to cause speed degradation. But I admit I created more crappy software with it than few better C++ because that easiness. [QUOTE]C++ will always remain hard and syntactically complex. You can't change that. You can only make a library that is consistent, reliable, easy to use, and hard to misuse.[/QUOTE] Only hard to understand thing for a newbie is pointers and memory management. At least it was for me when I switched from VB 6.0 to C++ 11 years ago. But I got used to in a week or so. Much harder part is managing different libraries to accomplish something. Still C# wouldn't be any easier than C++ if it didn't had the library. Because rest of the syntax is similar. And you can provide a garbage collected memory manager to overcome this, but I don't want to list hackish ways to accomplish some stuff that couldn't be able done out of box which everyone else is done it already enough time. I am saying just because point to flexibility of C++. [QUOTE]Got a car, an apartment, a degree and multiple job offers as well as a steady job. I'm okay thanks.[/QUOTE] This doesn't sound okay because it sound like you thinking material wealth as only virtue and what means 'life' or 'success'. If this is case I would be sorry for you. But if you are happy about what you are than I am glad for you.
Wait how did this thread go from horrible C++ to the definition of a scripting language? Worth noting that the main issue with writing fast code nowadays is making the best possible use of the memory hierarchy which basically means writing code that keeps structures as small as possible, keeps pointer chasing to a minimum and lays out data in large contiguous blocks. These approaches are universal regardless of language however languages like C# and Java heavily favour writing code that allocates lots of temporaries (hence the GC has to free lots of temporaries), chases lots of pointers (since objects are mainly referenced not copied) and makes it harder to pack data as tightly as possible. So, bullet-points: * C#/Java make it hard(er) to write high-performance code. * C++ lets you write high-performance code more easily, but only if you really pay attention and know what you're doing. * It's slightly harder to write insecure and broken code in C# and Java due to the restricted memory model. * Neither will allow you to magically shit out fast code, chances are your code will be slow as fuck anyway. * There is a benefit to compiling directly to machine code as it drops a layer of performance uncertainty (for better or worse). * Nobody posting in this thread is writing a AAA video game that pushes the limits of the technology that it's deployed on. * Even AAA games often use scripting languages as glue, there are places where crazy performance really isn't necessary. * This thread is horrible. And finally in response to the OP, please don't try an engineer such a framework. It won't be useful to anybody least of all yourself and creating thin wrappers around a bunch of libraries is not a great way to learn about how anything works (speaking from experience).
[QUOTE=codetorex;41633059]Well CIL is not assembly and it is not what running on cpu and you can't control what is CIL and how is interpreted. So optimizing for CIL is pointless while its interpretation could change later. So your argument is invalid.[/quote] [url=https://github.com/jbevain/cecil]Cecil[/url] lets you very easily emit your own CIL. (This is possible via reflection, but isn't nearly as clean). Additionally, you can use NGen/AoT to compile to assembly and see what the result is. It's very unlikely that a future implementation will be slower than an existing one. And most of the optimization I've done has been changes to the algorithm, rarely micro-optimizations. At least that's how it's been ever since I started profiling my code. Additionally, Mono has the ability to do [b][url=http://tirania.org/blog/archive/2008/Nov-05.html]full static compilation[/url][/b] and give you a [b]native binary that does not need a runtime to operate[/b]. This is used to deploy C# applications on iOS, PS3, Xbox 360, etc. This is something you CAN micro-optimize for. [b]If there's one thing in this post you should read, it's this ^[/b] [quote] I am somewhat agree with this because, I am used that word for insulting purposes. But one distinctive feature of scripting languages which makes me don't like them is bytecode. So my definition of scripting language is [I]When a programming language needs some host process to be executed from its bytecode or source code, and a large environment than software itself and some form of VM that needed to be available to run the executable it is a 'Scripting Language'[/I]. You may not agree with my definition nor C# may not just fits right in this definition because of broader usability but if we take account .Net is not designed for being cross-platform and only cross-platform way is using unofficial implementation called Mono, I thought I can say it as an almost scripting language of Windows. Maybe untrue but acceptable.[/quote] Like I said earlier, lots of large C++ projects on Windows require one of the many versions of the Visual C++ redistributable. The programs [b]will not run[/b] without it. The VM in C# is an intermediate step that defers about half of the compilation process to runtime. While the purpose of the two are different, in the end they're both seen as the same thing: a dependency. You need them to run your code. By your definition, they're in the same category. [quote] ECMA until 2.0. And I wonder how you can contribute to design or future of the language. And being proprietary is damaging its popularity among hackers, which is a theory I will investigate later in this wall of text. [/quote] Yes, this is true. However, Xamarin has been selling Mono-based solutions for iOS and Android for a while now that rely on C# 3.0+, Microsoft has yet to sue them. Probably because Mono was (is?) backed by Novell, who formed an agreement with Microsoft to not sue the shit out of each other. Additionally, the Open Invention Network lists Mono under the software they aim to protect legally. [quote] [I]2. There is no notable software made by C# that everyone uses, even they are exists they are crappy. [/I] If this is not true, please feel free to list some. Paint.Net and SharpDevelop are legit claims but I never used them and their marketshare and complexities between their counterparts will reveal the truth. Also they can be considered few exceptions that doesn't enough to break the rule about 'crappy'. I did a web search for double checking what I said and didn't found anything either. [/quote] Besides Paint.NET and SharpDevelop, there's a decent number of default/commonly intalled Ubuntu applications using C#: Banshee Beagle F-Spot Tomboy Additionally, Wikipedia is using C#/Mono for their indexing/search backend. [quote] And I have theory about this. Because easiness of C# its mostly used for developing internal company specialized software with RAD purposes or server side software for web and most of the time it used by junior level programmers. Because it is 'cheap' to develop software this way and result is obviously 'crappy'. So not much code review is done and people using C# having worser time frames to complete given project. Because project manager thinks it is relatively easy to program in C# and they think they add more juniors, if deadline will not going to meet. So even you are a best c# programmer, under such time constraints you produce crappy code. So it is not a fault in core or design of C# but psychology it creates. [/quote] Anything that improves productivity during prototyping will do this. This isn't a result of C#. [quote] It just makes me remember 10 years ago and arguments about VB 6.0. From what I see is C# mostly replaced VB crap, and on the way of replacing PHP. Only if Microsoft could courageous enough to make it fully open standard and source. So it could be used on Linux servers for web development and it would have a lot higher chance to replace PHP that way. But if I have a linux server (which is cheaper obviously) I don't have any choice to use C#. Running c# on mono is not convenient and I wasn't able to run it with latest MVC 4.0. So from this attitude, I am thinking about Microsoft invented this for creating dependency on its own products to create artificial scarcity so they can sell more products. And they didn't killed mono with patent lawsuits when they see it increased C# popularity. I can't blame them nor I am not against Microsoft, but it would be a lot good in this way instead and time spent on Mono would be spend on something else. Hell even it could be replaced Java and Android could pick C# instead of Java and which would lead to a better world. In this context I understand why Richard Stallman is so hardcore about freedom of software. [/quote] MVC 4.0 was one of the libraries Microsoft open sourced recently. It's included in Mono 3.0. Try it again, and it'll work. [quote] I am profiling my C++ code with available profiling tools mostly. And manually checking what assembly generated from my code time time to learn about how compiler optimizes the code, with that I am checking how much clocks they going to take when they got executed on CPU. This describes what being of "closer to steel". So I can check if compiler generated code to correctly using new CPU instruction sets and features. If it doesn't and there is no way to make compiler use them, I have the ability of spraying some assembly to it for forcing it to use those. Which is not I am doing much lately because not everyone knows it nor wants to use it and cross device concerns. But having the ability is important for me and sometimes crucial in some software. On C#, I never needed to do profiling. Because software I created with C# weren't complex enough to cause speed degradation. But I admit I created more crappy software with it than few better C++ because that easiness. [/quote] Like I said earlier, micro-optimization is something you rarely need to do. From my experience, it's almost always better to change the algorithm to pre-load or cache any time-consuming calculations if possible or to just do it in a completely different way. And as you said, you haven't created any complex software with C#. I have about 2 years of 3d game development experience with C#. 95% of the code I write is not time-critical. The other 5% can be made extremely fast with object pools, data caching, and multi-threading if necessary. I'm getting comparable performance in my game that I would expect from native code. Here's a perfect example: A few weeks ago, I found that my terrain rendering code was really slow after implementing shadow mapping. After some profiling, I realized it wasn't generating the quadtree that was slow, it wasn't rendering a whole bunch of tiles, it was just that I was generating bounding boxes for every tile every time I wanted to render the heightmap. I need these bounding boxes to do frustum culling. So what's the solution? Calculate the z-order of every tile and cache it's bounding box. Once I did that, all of a sudden terrain rendering appeared to be much cheaper according to the profiler and 4 shadow cascades at 4096x4096 was rendering without a problem. [quote] Only hard to understand thing for a newbie is pointers and memory management. At least it was for me when I switched from VB 6.0 to C++ 11 years ago. But I got used to in a week or so. Much harder part is managing different libraries to accomplish something. Still C# wouldn't be any easier than C++ if it didn't had the library. Because rest of the syntax is similar. And you can provide a garbage collected memory manager to overcome this, but I don't want to list hackish ways to accomplish some stuff that couldn't be able done out of box which everyone else is done it already enough time. I am saying just because point to flexibility of C++. [/quote] Templates can get complicated quickly, some of the error messages relating to them can be cryptic, forgetting a semicolon in the wrong place means hundreds of compiler errors, forgetting header guards, changing the function definition on the declaration or the implementation but not both, "using" namespaces can cause issues, multiple/virtual inheritance is a headache, etc. are just a few of the problems I ran into (and got past) as I learned C++ for a class this last semester. And I mention this earlier, but C# has [b]language features[/b] that are not part of the BCL that make life easier - LINQ, dynamic, async/await, etc. The design of C# also makes it so that none of the things I listed above are issues. These are fundamental language design differences, not just a part of the standard library that you can rip out.
[QUOTE=codetorex;41633059][I]2. There is no notable software made by C# that everyone uses, even they are exists they are crappy. [/I] If this is not true, please feel free to list some. Paint.Net and SharpDevelop are legit claims but I never used them and their marketshare and complexities between their counterparts will reveal the truth. Also they can be considered few exceptions that doesn't enough to break the rule about 'crappy'. I did a web search for double checking what I said and didn't found anything either.[/QUOTE] Besides the stuff robmaister listed above, there's also almost every website written with ASP.Net (like StackOverflow), a large amount of enterprise applications, HandBrake, and KeePass. There's also pretty much every game on XBLA and The Sims 3 (as I have previously mentioned), as well as almost every game made with Unity ([URL="http://unity3d.com/gallery/made-with-unity/game-list"]of which there are quite a lot[/URL])
[QUOTE=codetorex;41633059]You may not agree with my definition nor C# may not just fits right in this definition because of broader usability but if we take account .Net is not designed for being cross-platform and only cross-platform way is using unofficial implementation called Mono, I thought I can say it as an almost scripting language of Windows. Maybe untrue but acceptable.[/QUOTE] Now quite frankly I'm not sure of the extent of this, but to me .NET is designed to be cross-platform. Microsoft's implementation is not cross-platform, but you'll find things like Environment.NewLine and other tidbits in the .NET framework that have no real purpose other than adapting to other platforms. [QUOTE]If this is not true, please feel free to list some.[/QUOTE] I did. Again, market share is not a metric of the quality of the language. If you're going to call me out on a non-existent strawman, drop the [I]argumentum ad populum[/I]. [QUOTE]And I have theory about this. Because easiness of C# its mostly used for developing internal company specialized software with RAD purposes or server side software for web and most of the time it used by junior level programmers. Because it is 'cheap' to develop software this way and result is obviously 'crappy'. So not much code review is done and people using C# having worser time frames to complete given project. Because project manager thinks it is relatively easy to program in C# and they think they add more juniors, if deadline will not going to meet. So even you are a best c# programmer, under such time constraints you produce crappy code. So it is not a fault in core or design of C# but psychology it creates.[/QUOTE] This is a fairly tale that happens just as well with C++ as with C#, not an argument. [QUOTE]It just makes me remember 10 years ago and arguments about VB 6.0. From what I see is C# mostly replaced VB crap, and on the way of replacing PHP.[/QUOTE] Again, there is new C# code and there is converted C# code. Even rewrites of projects in C# do not always reuse code with translators, they often rewrite. [QUOTE]I am profiling my C++ code with available profiling tools mostly.[/QUOTE] Well yes, unavailable tools are hard to find. Which ones? [QUOTE]On C#, I never needed to do profiling. Because software I created with C# weren't complex enough to cause speed degradation. But I admit I created more crappy software with it than few better C++ because that easiness.[/QUOTE] I'd say lazyness is more the word here. A language being easy to use doesn't suddenly make you write shitty code. [quote]Only hard to understand thing for a newbie is pointers and memory management. At least it was for me when I switched from VB 6.0 to C++ 11 years ago. But I got used to in a week or so.[/quote] Oh of course, you adapted from motherfreaking VB.net to C++ in a week. Please. People take tens of years to begin to master C++, and unless proven otherwise neither of us are the next Jon Skeet. [quote]And you can provide a garbage collected memory manager to overcome this, but I don't want to list hackish ways to accomplish some stuff that couldn't be able done out of box which everyone else is done it already enough time. I am saying just because point to flexibility of C++.[/quote] Whether you agree with their usage or not, garbage collectors are well tested pieces of software with a design and purpose. They are not a 'hackish' way of doing things that can't be done. They're a different way of doing something. While I agree that C++ is more flexible in that regard, have you ever tried using a C++ garbage collector? I stick to smart pointers. C# does have facilities to handle memory that are slightly hidden from regular devs, by the way. They are not as flexible, but there's enough to go with for most of us. [quote]This doesn't sound okay because it sound like you thinking material wealth as only virtue and what means 'life' or 'success'. If this is case I would be sorry for you. But if you are happy about what you are than I am glad for you.[/quote] I don't know how old you are or where you live but around where I'm at having a decent job and degree is considered some form of success. It's not like I'm sending a robot there doing the work for me.
Oh god... [b]Every[/b] language [b]is[/b] a scripting language imo. When you use C++, you're scripting for a compiler. When you use Lua, you're scripting for (eg) garry's mod If you write machine code by hand, you're scripting the processor. If scripting is not ~hardcore~ enough, then build your own processor.
But, then you're just scripting electrons. [quote=Carl Sagan]If you wish to make an apple pie from scratch, you must first invent the universe[/quote]
[QUOTE=synthiac;41633552]By your definition, C# isn't a scripting language.[/QUOTE] I wrote it like that because exe file produced is CIL bytecode. And it needs JIT compiler and .net available to run. [QUOTE=qqqqqqqq]And finally in response to the OP, please don't try an engineer such a framework. It won't be useful to anybody least of all yourself and creating thin wrappers around a bunch of libraries is not a great way to learn about how anything works (speaking from experience).[/QUOTE] I agree all your post, just wanted to mention it's not going to be thin wrappers around libraries. It going to be library of its own. Most parts already developed in last 3 years in my free time and I learned a lot and had a lot of fun while doing it already. I wonder how do you got this idea :rolleyes: [QUOTE=robmaister12] Additionally, Mono has the ability to do full static compilation and give you a native binary that does not need a runtime to operate. This is used to deploy C# applications on iOS, PS3, Xbox 360, etc. This is something you CAN micro-optimize for. [/QUOTE] One of the best thing about C# is Mono. I have a great thanks to developers of it. But I don't know if you can see what assembly code generated for corresponding C# code. Still this is enough for me to take my words back about "scripting language". Still it would be better if it was an easy to use configuration. [QUOTE] Like I said earlier, lots of large C++ projects on Windows require one of the many versions of the Visual C++ redistributable. The programs will not run without it. The VM in C# is an intermediate step that defers about half of the compilation process to runtime. While the purpose of the two are different, in the end they're both seen as the same thing: a dependency. You need them to run your code. By your definition, they're in the same category. [/QUOTE] I don't like dependency of Visual C++ redistributables either, but I think you can omit them or statically link. Also there is bunch of compilers available other than Visual C++ which doesn't enforces you for libraries so your argument is invalid. [QUOTE] MVC 4.0 was one of the libraries Microsoft open sourced recently. It's included in Mono 3.0. Try it again, and it'll work. [/QUOTE] Yeah I know but it didn't worked and Mono 3.0 isn't released officaly as stable yet AFAIK. Tried to run it from sources without success. I lastly checked few months ago, if anything changed and is there any easy to install solution let me know. But still this was led me to search other options and I found how beautiful is node.js. But still I consider using C# on linux when needed. [QUOTE] Oh of course, you adapted from motherfreaking VB.net to C++ in a week. Please. People take tens of years to begin to master C++, and unless proven otherwise neither of us are the next Jon Skeet. [/QUOTE] It is not vb.net, it is vb 6.0. You can't imagine how bad it was. But still it was possible to use directx 8.0 with it. And I was had enough knowledge about programming when I made the switch. And there was an argument about some people defending "vb 6.0" like "it is possible to make games with vb 6.0" but other people were defending you must go c++ if you want to taken seriously. So I made the switch, I already had some assembly knowledge too, so understanding pointers wasn't that hard. And it took few weeks of me to patchup a very simple opengl engine that able to render md2 models and model format I used at the time. This story is why I care about this arguments and answering everything by explanations of what I thinking, so some people may find some information valuable for them. But its agreed mastering C++ takes years, not the syntax but the designing good architectures and OOP needs tons of experience. So one popular metaphore for this and I like is, takes the similarity of programming and mastering with chess. You can learn rules of chess in few days but mastering it needs playing it for years. And its not about just C++, same thing applies for C# too. And if you mastered in C# for years, you could switch to C++ in few weeks. But getting used to it may take more time, I don't know. Maybe highly subjective but if you teach someone what is pointers is it doesn't seems that is something hard to understand. Currently C# took place of vb 6.0 at that time, and can't be comparable both because C# have a much powerful design than it, but still I see some similarities between two. [QUOTE] I don't know how old you are or where you live but around where I'm at having a decent job and degree is considered some form of success. It's not like I'm sending a robot there doing the work for me. [/QUOTE] Yeah having a job and degree is considered success if that was your goal, but listing your wealth in public place is considered ill-bred too. I tried to point out the importance of "happiness". And already told I am glad if you are happy. I am sorry if I am misunderstood.
[QUOTE=codetorex;41643908]One of the best thing about C# is Mono. I have a great thanks to developers of it. But I don't know if you can see what assembly code generated for corresponding C# code. Still this is enough for me to take my words back about "scripting language". Still it would be better if it was an easy to use configuration.[/quote] Full static compilation generates platform-specific machine code, just as C and C++ do. And the only thing you can't do with it is reflection (naturally). A JIT engine is just one way of working with CIL. It's not a requirement to use C#. [quote] I don't like dependency of Visual C++ redistributables either, but I think you can omit them or statically link. Also there is bunch of compilers available other than Visual C++ which doesn't enforces you for libraries so your argument is invalid. [/quote] Static linking means you lose the ability for Windows Update to patch any security vulnerabilities found with the version of VC++ you're using. And yeah, there are a lot of other compilers available, but Steam, most of my Steam games, and basically every other program installed on my desktop needs it. C# [b]can[/b] be compiled down to machine language with Mono, but you lose the same ability for security vulnerabilities to be patched. They're still in the same boat. Just because one "defaults" to being fully compiled and the other to being JITted doesn't mean that it can't be the other way around. Remember that there are [url=https://code.google.com/p/picoc/]C interpreters[/url] as well. And either way, you're splitting hairs. Why does it matter if I compile everything right now on my machine or defer half of the compilation to when the user runs the application at runtime to allow for platform-specific optimization? (in practice there hasn't been much of this yet) [quote] Yeah I know but it didn't worked and Mono 3.0 isn't released officaly as stable yet AFAIK. Tried to run it from sources without success. I lastly checked few months ago, if anything changed and is there any easy to install solution let me know. But still this was led me to search other options and I found how beautiful is node.js. But still I consider using C# on linux when needed. [/quote] 3.0 was released last October. Arch, Gentoo, OpenSUSE, and probably a few others are already on it, everything else is either compile from source (which means 3.0+) or have preview/testing packages available for it.
Sorry, you need to Log In to post a reply to this thread.