OpenQuant strategy coding

Discussion in 'App Development' started by mcgene4xpro, Jul 11, 2012.

  1. that you call a serious limitation? Ever heard of interfaces?

    Seriously I have never ever come across once that I felt only being able to inherit from one base class is a limitation. You can inherit, by the way from several base classes indirectly (your base class inherits from another base class).

    What do you think of delegates in C#? Tell me how much simpler and more elegant can it get? I do not even want remember how clumsy it is to get it wired up in C++. Or tell me how many hours if not days it takes you to code up a high throughput, low latency data flow network that runs concurrently. I get it up and running for you in less than 2 hours plus 1 hour testing and debugging for a simple project. I challenge you to get the same in less than 1-2 days running in C++.

    P.S.: Actually you can have "synthetic" inheritance with interfaces. Plus you can manage changes and expansions of functionality with interfaces much more beautifully than through base classes. With interfaces you get to implement a much more important OOP principle much more elegantly through interfaces than base classes: Abstraction. You make it sound like as if its bad that the implementation of the interface is not provided, but its actually what allows the abstraction part to really shine.


     
    #21     Jul 13, 2012
  2. dom993

    dom993

    Sorry I didn't mean to start a pissing contest.

    I just said C# main limitation vs C++ is the single inheritance, and there is no point going ballistic about it.

    Re-read my prior posts, and tell me where I wrote C++ is better than C#.
     
    #22     Jul 13, 2012
  3. then what is your point exactly? I could name you over 100 features where C# shines vs C++. If I picked one of those 100 and that was all I mentioned what impression would you get? I miss your point here.

     
    #23     Jul 14, 2012
  4. ForAPlus

    ForAPlus

    Not planning to join the flame war, but do want to point out that multiple inheritance was explicitly considered in c# and rejected because it potentially leads to the Diamond Problem (http://en.wikipedia.org/wiki/Diamond_problem)

     
    #24     Jul 16, 2012
  5. dom993

    dom993

    There is no war here that I know of ...

    ... that said, and despite all the love I have for C# (read my posts again if you are not convinced), the diamond problem wouldn't be such a problem in C# with multiple inheritance if C# was forcing the shared base class to be virtual (as can be done in C++).

    It turns out that requires quite a bit of runtime overhead, which would be systematic in C# because all classes implicitly inherits from Object (which is pretty much a requirement for GC aka GarbageCollector). The single inheritance was just a way to cut a corner and keep C# performance as close as possible to that of C++.
     
    #25     Jul 16, 2012