• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 10:50
CEST 16:50
KST 23:50
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
Code S Season 1 - RO8 Preview3[ASL21] Ro8 Preview Pt2: Progenitors8Code S Season 1 - RO12 Group A: Rogue, Percival, Solar, Zoun13[ASL21] Ro8 Preview Pt1: Inheritors16[ASL21] Ro16 Preview Pt2: All Star10
Community News
Maestros of The Game 2 announcement and schedule !0Weekly Cups (April 27-May 4): Clem takes triple0RSL Revival: Season 5 - Qualifiers and Main Event12Code S Season 1 (2026) - RO12 Results12026 GSL Season 1 Qualifiers25
StarCraft 2
General
Code S Season 1 - RO8 Preview Behind the Blue - Team Liquid History Book Weekly Cups (April 27-May 4): Clem takes triple Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool Code S Season 1 (2026) - RO12 Results
Tourneys
GSL Code S Season 1 (2026) Sea Duckling Open (Global, Bronze-Diamond) Maestros of The Game 2 announcement and schedule ! RSL Revival: Season 5 - Qualifiers and Main Event Sparkling Tuna Cup - Weekly Open Tournament
Strategy
Custom Maps
[D]RTS in all its shapes and glory <3 [A] Nemrods 1/4 players
External Content
Mutation # 524 Death and Taxes The PondCast: SC2 News & Results Mutation # 523 Firewall Mutation # 522 Flip My Base
Brood War
General
Do we have a pimpest plays list? BGH Auto Balance -> http://bghmmr.eu/ (Spoiler) Asl ro8 D winner interview BW General Discussion AI Question
Tourneys
[ASL21] Ro8 Day 4 [BSL22] RO16 Group Stage - 02 - 10 May [ASL21] Ro8 Day 3 [Megathread] Daily Proleagues
Strategy
Simple Questions, Simple Answers Fighting Spirit mining rates What's the deal with APM & what's its true value Any training maps people recommend?
Other Games
General Games
Nintendo Switch Thread Dawn of War IV Stormgate/Frost Giant Megathread OutLive 25 (RTS Game) Daigo vs Menard Best of 10
Dota 2
The Story of Wings Gaming
League of Legends
G2 just beat GenG in First stand
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas TL Mafia Community Thread Five o'clock TL Mafia
Community
General
US Politics Mega-thread The Letting Off Steam Thread European Politico-economics QA Mega-thread Russo-Ukrainian War Thread 3D technology/software discussion
Fan Clubs
The IdrA Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece [Req][Books] Good Fantasy/SciFi books
Sports
McBoner: A hockey love story 2024 - 2026 Football Thread Formula 1 Discussion
World Cup 2022
Tech Support
streaming software Strange computer issues (software) [G] How to Block Livestream Ads
TL Community
The Automated Ban List
Blogs
How EEG Data Can Predict Gam…
TrAiDoS
ramps on octagon
StaticNine
Funny Nicknames
LUCKY_NOOB
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1943 users

The Big Programming Thread - Page 276

Forum Index > General Forum
Post a Reply
Prev 1 274 275 276 277 278 1032 Next
Thread Rules
1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution.
2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20)
3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible.
4. Use [code] tags to format code blocks.
aurum510
Profile Joined July 2010
United States229 Posts
March 21 2013 17:53 GMT
#5501
On March 22 2013 02:48 Kambing wrote:
Show nested quote +
On March 22 2013 02:44 aurum510 wrote:
Two more words ruin C#: dynamic binding


Eh, dynamic dispatch? Or type dynamic?


Now that you mention it, both!
Kambing
Profile Joined May 2010
United States1176 Posts
March 21 2013 18:31 GMT
#5502
On March 22 2013 02:53 aurum510 wrote:
Show nested quote +
On March 22 2013 02:48 Kambing wrote:
On March 22 2013 02:44 aurum510 wrote:
Two more words ruin C#: dynamic binding


Eh, dynamic dispatch? Or type dynamic?


Now that you mention it, both!


What's wrong with them? Dynamic dispatch is the backbone of object-oriented programming. If dynamic dispatch ruins C#, then you surely don't like OOP*. Type dynamic is an interoperability feature with dynamically-typed languages and only has an effect on your programs if you opt into its services.

(*To be fair, I don't like OOP either.)
CecilSunkure
Profile Blog Joined May 2010
United States2829 Posts
March 21 2013 19:03 GMT
#5503
On March 22 2013 02:41 Kambing wrote:
Show nested quote +
On March 22 2013 01:53 ddengster wrote:
On March 22 2013 01:26 CecilSunkure wrote:
On March 22 2013 01:14 Tobberoth wrote:
On March 21 2013 09:04 darkness wrote:
What makes C++ so famous for game development? You don't have to describe in details.

Thanks.

I've heard tons of reasons, some of them make sense, others do not. The most classic argument is that higher level languages like C# are too slow. This argument is quite weak, careful benchmarking shows that the difference is quite small nowadays, wellwritten C++ code and wellwritten C# code will often perform very very similarly.

The best reason I've heard has to do with the fact that DirectX etc is quite hard to work with effectively from higher level languages. Other than that, C++ offers a lot of flexibility which can be nice for doing larger scale optimizations.

Two words ruin C#: garbage collection.


garbage collection(GC) with respect to bad performance or?
In my opinion, GC is still borderline ok; it frees lazy programmers from the burden of doing memory management, as long as they don't get hit with related bugs.
The reason you'd use C# is reflection and widgets for game developer tools.


More specifically, stop-the-world GC (can) ruin the soft real-time requirements of a video game (in general, any computationally intensive interactive simulation). Note that computers are powerful enough and runtime technology advanced enough this is only true of games that are pushing the boundaries of what current technology can afford. Beyond this point, you are making an engineering trade-off between the convenience of GC, the performance hit and behavior of GC on your program, and manpower optimizing your program around these constraints.

And yes, C# (and other higher-level languages) serve very well in the space of creating supporting tools for games development such as level editors, assets managers, etc.

Well the biggest thing is the lack of control. If you could just control when the GC ran it wouldn't be a big deal.
Kambing
Profile Joined May 2010
United States1176 Posts
Last Edited: 2013-03-21 19:24:32
March 21 2013 19:24 GMT
#5504
On March 22 2013 04:03 CecilSunkure wrote:
Show nested quote +
On March 22 2013 02:41 Kambing wrote:
On March 22 2013 01:53 ddengster wrote:
On March 22 2013 01:26 CecilSunkure wrote:
On March 22 2013 01:14 Tobberoth wrote:
On March 21 2013 09:04 darkness wrote:
What makes C++ so famous for game development? You don't have to describe in details.

Thanks.

I've heard tons of reasons, some of them make sense, others do not. The most classic argument is that higher level languages like C# are too slow. This argument is quite weak, careful benchmarking shows that the difference is quite small nowadays, wellwritten C++ code and wellwritten C# code will often perform very very similarly.

The best reason I've heard has to do with the fact that DirectX etc is quite hard to work with effectively from higher level languages. Other than that, C++ offers a lot of flexibility which can be nice for doing larger scale optimizations.

Two words ruin C#: garbage collection.


garbage collection(GC) with respect to bad performance or?
In my opinion, GC is still borderline ok; it frees lazy programmers from the burden of doing memory management, as long as they don't get hit with related bugs.
The reason you'd use C# is reflection and widgets for game developer tools.


More specifically, stop-the-world GC (can) ruin the soft real-time requirements of a video game (in general, any computationally intensive interactive simulation). Note that computers are powerful enough and runtime technology advanced enough this is only true of games that are pushing the boundaries of what current technology can afford. Beyond this point, you are making an engineering trade-off between the convenience of GC, the performance hit and behavior of GC on your program, and manpower optimizing your program around these constraints.

And yes, C# (and other higher-level languages) serve very well in the space of creating supporting tools for games development such as level editors, assets managers, etc.

Well the biggest thing is the lack of control. If you could just control when the GC ran it wouldn't be a big deal.


Yeah, control goes into the real-time requirement which is really the problem with GC in the cases that people think of. You can control the GC to some degree, e.g., GC.collect() to force collections. With this and some careful organization of your program, you can ensure that allocations occur only when your program can tolerate the latency. However, this requires careful consideration of the program's memory footprint and still doesn't work in all cases.
mcc
Profile Joined October 2010
Czech Republic4646 Posts
Last Edited: 2013-03-21 22:00:41
March 21 2013 21:56 GMT
#5505
On March 22 2013 01:00 AmericanUmlaut wrote:
Show nested quote +
On March 21 2013 22:03 mcc wrote:
On March 21 2013 06:17 Kambing wrote:
On March 21 2013 06:02 obesechicken13 wrote:
Do any of you have any experience with regression testing?

What should it include? Wikipedia hints that regression testing may just be a small set of tests for things that have broken in the past. But what I've always done is I've run through every single feature in the test suite. What is the best practice here?

edit: f*** nvm
http://www.testingeducation.org/k04/RegressionExamples.htm
General functional regression: We retest the product broadly, including areas that worked before, to see whether more recent changes have destabilized working code. (This is the typical scope of automated regression testing.)


Many companies have the following process: for every bug fix made to the product, a test is introduced into a test suite to ensure that the bug is never reintroduced. This test suite, made from prior bug fixes, is called a regression test suite.


That seems very narrow view of regression testing. Regression testing as we used it was supposed to make sure that new changes to the system do not introduce bugs in parts of the system that were not supposed to be affected by those changes. Basically they exist to discover side-effect bugs of new changes and also errors in analysis of the new changes.

In the case of project I worked on it was a set of tests that covered all critical functions of the system. Using just tests based on previous bugs does not seem to address the issue.

That is a fairly common way of building a regression test library, though. It has a certain compelling logic to it, too: It guarantees you'll only ever have to fix a particular problem once, and it guarantees you'll invest test-writing time in components in direct proportion to their propensity to develop bugs.

I am not saying it is bad, I just think it is somewhat incomplete. It is definitely good part of regression tests. But as Kambing pointed out later it somewhat comes down to terminology.
mcc
Profile Joined October 2010
Czech Republic4646 Posts
March 21 2013 21:59 GMT
#5506
On March 22 2013 04:03 CecilSunkure wrote:
Show nested quote +
On March 22 2013 02:41 Kambing wrote:
On March 22 2013 01:53 ddengster wrote:
On March 22 2013 01:26 CecilSunkure wrote:
On March 22 2013 01:14 Tobberoth wrote:
On March 21 2013 09:04 darkness wrote:
What makes C++ so famous for game development? You don't have to describe in details.

Thanks.

I've heard tons of reasons, some of them make sense, others do not. The most classic argument is that higher level languages like C# are too slow. This argument is quite weak, careful benchmarking shows that the difference is quite small nowadays, wellwritten C++ code and wellwritten C# code will often perform very very similarly.

The best reason I've heard has to do with the fact that DirectX etc is quite hard to work with effectively from higher level languages. Other than that, C++ offers a lot of flexibility which can be nice for doing larger scale optimizations.

Two words ruin C#: garbage collection.


garbage collection(GC) with respect to bad performance or?
In my opinion, GC is still borderline ok; it frees lazy programmers from the burden of doing memory management, as long as they don't get hit with related bugs.
The reason you'd use C# is reflection and widgets for game developer tools.


More specifically, stop-the-world GC (can) ruin the soft real-time requirements of a video game (in general, any computationally intensive interactive simulation). Note that computers are powerful enough and runtime technology advanced enough this is only true of games that are pushing the boundaries of what current technology can afford. Beyond this point, you are making an engineering trade-off between the convenience of GC, the performance hit and behavior of GC on your program, and manpower optimizing your program around these constraints.

And yes, C# (and other higher-level languages) serve very well in the space of creating supporting tools for games development such as level editors, assets managers, etc.

Well the biggest thing is the lack of control. If you could just control when the GC ran it wouldn't be a big deal.

So D is the way to go
aurum510
Profile Joined July 2010
United States229 Posts
March 22 2013 03:47 GMT
#5507
On March 22 2013 03:31 Kambing wrote:
Show nested quote +
On March 22 2013 02:53 aurum510 wrote:
On March 22 2013 02:48 Kambing wrote:
On March 22 2013 02:44 aurum510 wrote:
Two more words ruin C#: dynamic binding


Eh, dynamic dispatch? Or type dynamic?


Now that you mention it, both!


What's wrong with them? Dynamic dispatch is the backbone of object-oriented programming. If dynamic dispatch ruins C#, then you surely don't like OOP*. Type dynamic is an interoperability feature with dynamically-typed languages and only has an effect on your programs if you opt into its services.

(*To be fair, I don't like OOP either.)


The context was meant that C# should not be used to make games (or anything that requires performance as a significant concern). Dynamic dispatch requires a lot of overhead during run-time. C++ uses only static dispatch unless specified with the virtual keyword.
CecilSunkure
Profile Blog Joined May 2010
United States2829 Posts
March 22 2013 03:56 GMT
#5508
On March 22 2013 03:31 Kambing wrote:
Show nested quote +
On March 22 2013 02:53 aurum510 wrote:
On March 22 2013 02:48 Kambing wrote:
On March 22 2013 02:44 aurum510 wrote:
Two more words ruin C#: dynamic binding


Eh, dynamic dispatch? Or type dynamic?


Now that you mention it, both!


What's wrong with them? Dynamic dispatch is the backbone of object-oriented programming. If dynamic dispatch ruins C#, then you surely don't like OOP*. Type dynamic is an interoperability feature with dynamically-typed languages and only has an effect on your programs if you opt into its services.

(*To be fair, I don't like OOP either.)

Could you explain this dynamic dispatch thing being the backbone?
teamamerica
Profile Blog Joined July 2010
United States958 Posts
Last Edited: 2013-03-22 04:36:49
March 22 2013 04:24 GMT
#5509
On March 22 2013 12:47 aurum510 wrote:
Show nested quote +
On March 22 2013 03:31 Kambing wrote:
On March 22 2013 02:53 aurum510 wrote:
On March 22 2013 02:48 Kambing wrote:
On March 22 2013 02:44 aurum510 wrote:
Two more words ruin C#: dynamic binding


Eh, dynamic dispatch? Or type dynamic?


Now that you mention it, both!


What's wrong with them? Dynamic dispatch is the backbone of object-oriented programming. If dynamic dispatch ruins C#, then you surely don't like OOP*. Type dynamic is an interoperability feature with dynamically-typed languages and only has an effect on your programs if you opt into its services.

(*To be fair, I don't like OOP either.)


The context was meant that C# should not be used to make games (or anything that requires performance as a significant concern). Dynamic dispatch requires a lot of overhead during run-time. C++ uses only static dispatch unless specified with the virtual keyword.


For most people who want to make indie games, why not use C#? It lets you focus on building your games story, as compared to optimizing a bunch of C++ code. I can't imagine most indie game developers are writing games that are breakneck performance. You make a tradeoff between time to finish game and performance when choosing C++ over another language imo.

edit: realize now that this was in reference to someone asking why was C++ famous for game dev. I just get tired of people going around telling someone who asks 'How do I make a game' to dive into C++, when imho they're better off starting in another language, making some games, and running into the limitations of the language themselves.

On March 22 2013 12:56 CecilSunkure wrote:
Show nested quote +
On March 22 2013 03:31 Kambing wrote:
On March 22 2013 02:53 aurum510 wrote:
On March 22 2013 02:48 Kambing wrote:
On March 22 2013 02:44 aurum510 wrote:
Two more words ruin C#: dynamic binding


Eh, dynamic dispatch? Or type dynamic?


Now that you mention it, both!


What's wrong with them? Dynamic dispatch is the backbone of object-oriented programming. If dynamic dispatch ruins C#, then you surely don't like OOP*. Type dynamic is an interoperability feature with dynamically-typed languages and only has an effect on your programs if you opt into its services.

(*To be fair, I don't like OOP either.)

Could you explain this dynamic dispatch thing being the backbone?


How else do you have polymorphism?
RIP GOMTV. RIP PROLEAGUE.
CecilSunkure
Profile Blog Joined May 2010
United States2829 Posts
March 22 2013 04:35 GMT
#5510
On March 22 2013 13:24 teamamerica wrote:
How else do you have polymorphism?

Oh lol, I was actually thinking of double dispatch. Sorry got confused.
nunez
Profile Blog Joined February 2011
Norway4003 Posts
March 22 2013 11:53 GMT
#5511
On March 22 2013 13:24 teamamerica wrote:
Show nested quote +
On March 22 2013 12:47 aurum510 wrote:
On March 22 2013 03:31 Kambing wrote:
On March 22 2013 02:53 aurum510 wrote:
On March 22 2013 02:48 Kambing wrote:
On March 22 2013 02:44 aurum510 wrote:
Two more words ruin C#: dynamic binding


Eh, dynamic dispatch? Or type dynamic?


Now that you mention it, both!


What's wrong with them? Dynamic dispatch is the backbone of object-oriented programming. If dynamic dispatch ruins C#, then you surely don't like OOP*. Type dynamic is an interoperability feature with dynamically-typed languages and only has an effect on your programs if you opt into its services.

(*To be fair, I don't like OOP either.)


The context was meant that C# should not be used to make games (or anything that requires performance as a significant concern). Dynamic dispatch requires a lot of overhead during run-time. C++ uses only static dispatch unless specified with the virtual keyword.


For most people who want to make indie games, why not use C#? It lets you focus on building your games story, as compared to optimizing a bunch of C++ code. I can't imagine most indie game developers are writing games that are breakneck performance. You make a tradeoff between time to finish game and performance when choosing C++ over another language imo.

edit: realize now that this was in reference to someone asking why was C++ famous for game dev. I just get tired of people going around telling someone who asks 'How do I make a game' to dive into C++, when imho they're better off starting in another language, making some games, and running into the limitations of the language themselves.

Show nested quote +
On March 22 2013 12:56 CecilSunkure wrote:
On March 22 2013 03:31 Kambing wrote:
On March 22 2013 02:53 aurum510 wrote:
On March 22 2013 02:48 Kambing wrote:
On March 22 2013 02:44 aurum510 wrote:
Two more words ruin C#: dynamic binding


Eh, dynamic dispatch? Or type dynamic?


Now that you mention it, both!


What's wrong with them? Dynamic dispatch is the backbone of object-oriented programming. If dynamic dispatch ruins C#, then you surely don't like OOP*. Type dynamic is an interoperability feature with dynamically-typed languages and only has an effect on your programs if you opt into its services.

(*To be fair, I don't like OOP either.)

Could you explain this dynamic dispatch thing being the backbone?


How else do you have polymorphism?

there is static polymorphism.
conspired against by a confederacy of dunces.
Kambing
Profile Joined May 2010
United States1176 Posts
March 22 2013 13:04 GMT
#5512
On March 22 2013 12:56 CecilSunkure wrote:
Show nested quote +
On March 22 2013 03:31 Kambing wrote:
On March 22 2013 02:53 aurum510 wrote:
On March 22 2013 02:48 Kambing wrote:
On March 22 2013 02:44 aurum510 wrote:
Two more words ruin C#: dynamic binding


Eh, dynamic dispatch? Or type dynamic?


Now that you mention it, both!


What's wrong with them? Dynamic dispatch is the backbone of object-oriented programming. If dynamic dispatch ruins C#, then you surely don't like OOP*. Type dynamic is an interoperability feature with dynamically-typed languages and only has an effect on your programs if you opt into its services.

(*To be fair, I don't like OOP either.)

Could you explain this dynamic dispatch thing being the backbone?


Dynamic dispatch --- method overriding --- is typically considered the "heart" of OOP because it is the most unique and essential feature of the language paradigm. Other features of OOP can be easily emulated in other language paradigms e.g., classes as records, inheritance as (explicit) record subtyping, or are not essential, e.g., the lack of classes in prototype-based programming languages such as Javascript. However, the mechanism of dynamic dispatch are both non-trivial and present in every OO language.
Kambing
Profile Joined May 2010
United States1176 Posts
Last Edited: 2013-03-22 13:13:18
March 22 2013 13:11 GMT
#5513
On March 22 2013 12:47 aurum510 wrote:
Show nested quote +
On March 22 2013 03:31 Kambing wrote:
On March 22 2013 02:53 aurum510 wrote:
On March 22 2013 02:48 Kambing wrote:
On March 22 2013 02:44 aurum510 wrote:
Two more words ruin C#: dynamic binding


Eh, dynamic dispatch? Or type dynamic?


Now that you mention it, both!


What's wrong with them? Dynamic dispatch is the backbone of object-oriented programming. If dynamic dispatch ruins C#, then you surely don't like OOP*. Type dynamic is an interoperability feature with dynamically-typed languages and only has an effect on your programs if you opt into its services.

(*To be fair, I don't like OOP either.)


The context was meant that C# should not be used to make games (or anything that requires performance as a significant concern). Dynamic dispatch requires a lot of overhead during run-time. C++ uses only static dispatch unless specified with the virtual keyword.


C# is perfectly fine for many games that someone would like to make. For Crisis, Farcry, etc., it is likely not appropriate but that is only a tiny subset of games out there.

Dynamic dispatch does require a non-trivial performance penalty (the cost of a pointer indirection), but that isn't necessarily a prohibitive cost. And in fact, C# does the "right" thing like C++ and only has opt-in dynamic dispatch via the overrides keyword.

Besides (stop-the-world) garbage collection ruining soft real-time guarantees, the primary performance benefit that C++ provides is explicit memory layout (rather than management). In Java (and to a lesser extent, C#), you do not have direct control over how objects are laid out in memory, for example contiguously or via indirect pointers or on the stack vs. on the heap. These sorts of considerations in C++, when properly tuned, can lead to significant performance gains over higher-level languages.
aurum510
Profile Joined July 2010
United States229 Posts
Last Edited: 2013-03-22 13:32:36
March 22 2013 13:21 GMT
#5514
On March 22 2013 20:53 nunez wrote:
Show nested quote +
On March 22 2013 13:24 teamamerica wrote:
On March 22 2013 12:47 aurum510 wrote:
On March 22 2013 03:31 Kambing wrote:
On March 22 2013 02:53 aurum510 wrote:
On March 22 2013 02:48 Kambing wrote:
On March 22 2013 02:44 aurum510 wrote:
Two more words ruin C#: dynamic binding


Eh, dynamic dispatch? Or type dynamic?


Now that you mention it, both!


What's wrong with them? Dynamic dispatch is the backbone of object-oriented programming. If dynamic dispatch ruins C#, then you surely don't like OOP*. Type dynamic is an interoperability feature with dynamically-typed languages and only has an effect on your programs if you opt into its services.

(*To be fair, I don't like OOP either.)


The context was meant that C# should not be used to make games (or anything that requires performance as a significant concern). Dynamic dispatch requires a lot of overhead during run-time. C++ uses only static dispatch unless specified with the virtual keyword.


For most people who want to make indie games, why not use C#? It lets you focus on building your games story, as compared to optimizing a bunch of C++ code. I can't imagine most indie game developers are writing games that are breakneck performance. You make a tradeoff between time to finish game and performance when choosing C++ over another language imo.

edit: realize now that this was in reference to someone asking why was C++ famous for game dev. I just get tired of people going around telling someone who asks 'How do I make a game' to dive into C++, when imho they're better off starting in another language, making some games, and running into the limitations of the language themselves.

On March 22 2013 12:56 CecilSunkure wrote:
On March 22 2013 03:31 Kambing wrote:
On March 22 2013 02:53 aurum510 wrote:
On March 22 2013 02:48 Kambing wrote:
On March 22 2013 02:44 aurum510 wrote:
Two more words ruin C#: dynamic binding


Eh, dynamic dispatch? Or type dynamic?


Now that you mention it, both!


What's wrong with them? Dynamic dispatch is the backbone of object-oriented programming. If dynamic dispatch ruins C#, then you surely don't like OOP*. Type dynamic is an interoperability feature with dynamically-typed languages and only has an effect on your programs if you opt into its services.

(*To be fair, I don't like OOP either.)

Could you explain this dynamic dispatch thing being the backbone?


How else do you have polymorphism?

there is static polymorphism.


Yes! This is what makes C++ very useful for performance. You can still use OOP, but there are no run-time checks. It's very important.

[Edit]: To be fair, C# has similar abilities for only using dynamic dispatch when told to do so.
aurum510
Profile Joined July 2010
United States229 Posts
March 22 2013 13:31 GMT
#5515
On March 22 2013 22:11 Kambing wrote:
Show nested quote +
On March 22 2013 12:47 aurum510 wrote:
On March 22 2013 03:31 Kambing wrote:
On March 22 2013 02:53 aurum510 wrote:
On March 22 2013 02:48 Kambing wrote:
On March 22 2013 02:44 aurum510 wrote:
Two more words ruin C#: dynamic binding


Eh, dynamic dispatch? Or type dynamic?


Now that you mention it, both!


What's wrong with them? Dynamic dispatch is the backbone of object-oriented programming. If dynamic dispatch ruins C#, then you surely don't like OOP*. Type dynamic is an interoperability feature with dynamically-typed languages and only has an effect on your programs if you opt into its services.

(*To be fair, I don't like OOP either.)


The context was meant that C# should not be used to make games (or anything that requires performance as a significant concern). Dynamic dispatch requires a lot of overhead during run-time. C++ uses only static dispatch unless specified with the virtual keyword.


C# is perfectly fine for many games that someone would like to make. For Crisis, Farcry, etc., it is likely not appropriate but that is only a tiny subset of games out there.

Dynamic dispatch does require a non-trivial performance penalty (the cost of a pointer indirection), but that isn't necessarily a prohibitive cost. And in fact, C# does the "right" thing like C++ and only has opt-in dynamic dispatch via the overrides keyword.

Besides (stop-the-world) garbage collection ruining soft real-time guarantees, the primary performance benefit that C++ provides is explicit memory layout (rather than management). In Java (and to a lesser extent, C#), you do not have direct control over how objects are laid out in memory, for example contiguously or via indirect pointers or on the stack vs. on the heap. These sorts of considerations in C++, when properly tuned, can lead to significant performance gains over higher-level languages.


I meant more the necessary runtime checks to look up the method in the vtable (while still technically O(1), it's not nice to look something up in a hashtable, as it requires some calculations to get the hash).

But it's true that it's not very bad, as you say (specifically for games, and less for systems where performance is crucial).
Kambing
Profile Joined May 2010
United States1176 Posts
March 22 2013 13:57 GMT
#5516
On March 22 2013 22:31 aurum510 wrote:
Show nested quote +
On March 22 2013 22:11 Kambing wrote:
On March 22 2013 12:47 aurum510 wrote:
On March 22 2013 03:31 Kambing wrote:
On March 22 2013 02:53 aurum510 wrote:
On March 22 2013 02:48 Kambing wrote:
On March 22 2013 02:44 aurum510 wrote:
Two more words ruin C#: dynamic binding


Eh, dynamic dispatch? Or type dynamic?


Now that you mention it, both!


What's wrong with them? Dynamic dispatch is the backbone of object-oriented programming. If dynamic dispatch ruins C#, then you surely don't like OOP*. Type dynamic is an interoperability feature with dynamically-typed languages and only has an effect on your programs if you opt into its services.

(*To be fair, I don't like OOP either.)


The context was meant that C# should not be used to make games (or anything that requires performance as a significant concern). Dynamic dispatch requires a lot of overhead during run-time. C++ uses only static dispatch unless specified with the virtual keyword.


C# is perfectly fine for many games that someone would like to make. For Crisis, Farcry, etc., it is likely not appropriate but that is only a tiny subset of games out there.

Dynamic dispatch does require a non-trivial performance penalty (the cost of a pointer indirection), but that isn't necessarily a prohibitive cost. And in fact, C# does the "right" thing like C++ and only has opt-in dynamic dispatch via the overrides keyword.

Besides (stop-the-world) garbage collection ruining soft real-time guarantees, the primary performance benefit that C++ provides is explicit memory layout (rather than management). In Java (and to a lesser extent, C#), you do not have direct control over how objects are laid out in memory, for example contiguously or via indirect pointers or on the stack vs. on the heap. These sorts of considerations in C++, when properly tuned, can lead to significant performance gains over higher-level languages.


I meant more the necessary runtime checks to look up the method in the vtable (while still technically O(1), it's not nice to look something up in a hashtable, as it requires some calculations to get the hash).

But it's true that it's not very bad, as you say (specifically for games, and less for systems where performance is crucial).


Yeah, my pointer indirection comment is about the runtime cost of method lookup. No hashing is required for a vtable in a (traditional, receiver-based) OO language as the name of function you want to lookup at runtime is known at compile time. This amounts to compiling the method invocation down into a lookup of the vtable at the particular offset that contains the method you want.

(In the case of reflection, you do need some more complicated lookup scheme like a dictionary as you need to essentially perform the "hashing" of the function name-to-vtable entry computation at runtime.)
Recognizable
Profile Blog Joined December 2011
Netherlands1552 Posts
March 22 2013 21:09 GMT
#5517
Man. I just had a very weird experienced. I'm new to programming and I was doing this exercise on Euler and as I got stuck I sat back and looked at my code. Then it hit me. My variable names actually have meaning as in, they have meaning in the English language. When I program they lose all the meaning they had beforehand, the variable names will have become a number or a string. I can have a variable named: "Hello" and during my programming my brain doesn't register its meaning as "Hello" because it has become something entirely different. Made me question meaning, my life and everything for a moment. Then I got mad because my code wouldn't work.
heishe
Profile Blog Joined June 2009
Germany2284 Posts
March 22 2013 21:11 GMT
#5518
On March 23 2013 06:09 Recognizable wrote:
Man. I just had a very weird experienced. I'm new to programming and I was doing this exercise on Euler and as I got stuck I sat back and looked at my code. Then it hit me. My variable names actually have meaning as in, they have meaning in the English language. When I program they lose all the meaning they had beforehand, the variable names will have become a number or a string. I can have a variable named: "Hello" and during my programming my brain doesn't register its meaning as "Hello" because it has become something entirely different. Made me question meaning, my life and everything for a moment. Then I got mad because my code wouldn't work.


Just wait until you learn a functional language.
If you value your soul, never look into the eye of a horse. Your soul will forever be lost in the void of the horse.
Holy_AT
Profile Joined July 2010
Austria978 Posts
March 22 2013 21:13 GMT
#5519
On March 23 2013 06:11 heishe wrote:
Show nested quote +
On March 23 2013 06:09 Recognizable wrote:
Man. I just had a very weird experienced. I'm new to programming and I was doing this exercise on Euler and as I got stuck I sat back and looked at my code. Then it hit me. My variable names actually have meaning as in, they have meaning in the English language. When I program they lose all the meaning they had beforehand, the variable names will have become a number or a string. I can have a variable named: "Hello" and during my programming my brain doesn't register its meaning as "Hello" because it has become something entirely different. Made me question meaning, my life and everything for a moment. Then I got mad because my code wouldn't work.


Just wait until you learn a functional language.


I'd skip them and start directly with OO
tehemperorer
Profile Blog Joined June 2010
United States2183 Posts
March 22 2013 21:19 GMT
#5520
On March 23 2013 06:09 Recognizable wrote:
Man. I just had a very weird experienced. I'm new to programming and I was doing this exercise on Euler and as I got stuck I sat back and looked at my code. Then it hit me. My variable names actually have meaning as in, they have meaning in the English language. When I program they lose all the meaning they had beforehand, the variable names will have become a number or a string. I can have a variable named: "Hello" and during my programming my brain doesn't register its meaning as "Hello" because it has become something entirely different. Made me question meaning, my life and everything for a moment. Then I got mad because my code wouldn't work.

String Float = new String("true");
Knowing is half the battle... the other half is lasers.
Prev 1 274 275 276 277 278 1032 Next
Please log in or register to reply.
Live Events Refresh
OSC
13:00
King of the Hill #247
Liquipedia
OSC
11:00
Mid Season Playoffs
WardiTV772
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Ryung 955
Hui .449
StarCraft: Brood War
Britney 55028
Calm 5510
firebathero 3042
Sea 2718
Bisu 2601
Horang2 917
EffOrt 660
BeSt 404
Hyuk 399
Light 371
[ Show more ]
Stork 366
actioN 335
ggaemo 300
Rush 249
Snow 217
Soulkey 159
hero 131
Mind 100
Soma 94
Hyun 89
Mong 79
ToSsGirL 56
Pusan 54
Backho 52
Killer 52
Hm[arnc] 46
PianO 44
Aegong 35
Rock 22
sorry 22
Terrorterran 18
Shine 17
JulyZerg 15
IntoTheRainbow 14
soO 14
Bale 14
Sacsri 13
GoRush 12
Movie 12
scan(afreeca) 11
Trikslyr1
Dota 2
Gorgc4590
qojqva1740
XBOCT693
420jenkins213
monkeys_forever201
Counter-Strike
byalli491
adren_tv55
Heroes of the Storm
XaKoH 93
Other Games
hiko1432
B2W.Neo1045
Liquid`RaSZi661
Beastyqt484
Lowko373
ArmadaUGS101
Mew2King83
Livibee46
KnowMe46
Organizations
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 16 non-featured ]
StarCraft 2
• LUISG 23
• poizon28 19
• iHatsuTV 13
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• WagamamaTV305
League of Legends
• TFBlade1356
Other Games
• Shiphtur186
Upcoming Events
Replay Cast
9h 10m
Escore
19h 10m
The PondCast
19h 10m
WardiTV Invitational
20h 10m
Zoun vs Ryung
Lambo vs ShoWTimE
Big Brain Bouts
1d 1h
Fjant vs Bly
Serral vs Shameless
OSC
1d 7h
Replay Cast
1d 9h
CranKy Ducklings
1d 19h
RSL Revival
1d 19h
SHIN vs Bunny
ByuN vs Shameless
WardiTV Invitational
1d 20h
Krystianer vs TriGGeR
Cure vs Rogue
[ Show More ]
uThermal 2v2 Circuit
2 days
BSL
2 days
Artosis vs TerrOr
spx vs StRyKeR
Replay Cast
2 days
Sparkling Tuna Cup
2 days
RSL Revival
2 days
Cure vs Zoun
Clem vs Lambo
WardiTV Invitational
2 days
BSL
3 days
Dewalt vs DragOn
Aether vs Jimin
GSL
3 days
Afreeca Starleague
3 days
Soma vs Leta
Wardi Open
3 days
Monday Night Weeklies
4 days
OSC
4 days
CranKy Ducklings
4 days
Afreeca Starleague
4 days
Light vs Flash
Replay Cast
5 days
Replay Cast
6 days
The PondCast
6 days
Liquipedia Results

Completed

Proleague 2026-05-05
WardiTV TLMC #16
Nations Cup 2026

Ongoing

BSL Season 22
ASL Season 21
CSL 2026 SPRING (S20)
IPSL Spring 2026
KCM Race Survival 2026 Season 2
Acropolis #4
SCTL 2026 Spring
RSL Revival: Season 5
2026 GSL S1
BLAST Rivals Spring 2026
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026

Upcoming

Escore Tournament S2: W6
KK 2v2 League Season 1
BSL 22 Non-Korean Championship
YSL S3
Escore Tournament S2: W7
Escore Tournament S2: W8
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
Maestros of the Game 2
2026 GSL S2
Stake Ranked Episode 3
XSE Pro League 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
IEM Atlanta 2026
Asian Champions League 2026
PGL Astana 2026
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2026 TLnet. All Rights Reserved.