C++ vs. Borland Delphi

Discussion in 'Automated Trading' started by Norm, Mar 3, 2006.

  1. Norm


    I am about to learn a programming language so that I can use APIs, like the one provided by Interactive Brokers, to automate trading. I was leaning toward C++, but a friend who is a programmer pointed out that development time can be shortened significantly using Borland's Delphi.

    I realize that source code is likely to compile to about the same (possibly indistinguishable) object code regardless of which language is used, so I was leaning in favor of Borland Delphi.

    However, I belive that use of an API like IB's requires communication between the program that I write and the API that may require the use of a particular programming language. Or, at least the examples (code snippets) provided for using the API assume a particular language (like C++). Therefore, maybe it is best to stay with the programming language recommended by the API provider.

    Any thoughts on using Borland Delphi instead of C++ to run an automated strategy with IB's API?

  2. ids


    I cannot give you a concrete recommendation because it is a matter of personal preferences. Let me just mention that Delpi is much more convenient tool for user interface development and you will need it. You can also take a look at http://www.hhssoftware.com/iabsocketapi/
  3. You'll save yourself from a lot of troubles if you stick with API native language. Especially if you are ok with a simple GU interface for your programs.
  4. ids


    It is quite easy to deal with C++ types and APIs in Delphi. Any experienced programmer can do it without any trouble.
  5. Can you show a small example? How do you deal with mangled names? Or you think it's easy to do for someone who makes up his mind between learning C++ or Delphi? First off one has to be fluent in both, agreed?
  6. sccz97


    If all you want to do is hack together something this one time , delphi will prob be your best best. IT's easy to learn and you don't have to worry about garbage collection and a whole slew of other things that you would do in c++. However, delphi is pretty much a dead language. Why haave you not considered java or .net?

  7. The dilemma of the first poster is how easy it would be to link Delphi ( or java whatever) with C++ libraries. If his program is written in C++ this is done simply by the linker.
  8. C++ is a language meant for professional programmers and has the steepest learning curve. The positive trade off is that it allows you to do highly optimized "bare metal" code.

    I have a Computer Science degree and 25 years exerience programming... and I've managed to avoid C++ all this time.
    Would rather spend 90% of my time working on trading... than hacking around with the latest language incarnation.

    It's hard to give you advice if you have an unspecified, but limited, programming backgroud. Choosing the hardest language because of a particular API is not the way to make this decision.

    If you can't handle hooking into the C++ API from another language... how in the world are you going to build a robust ATS?

    Building my IB API in VB6 with an Excel front-end is working out very well... but it's the hardest thing I've done in 25 years. After about 6 months and maybe 400-500 hours... it's very stable and (usually) runs all day without glitches. I do 150 trades/day.

    (I not going to debate my choices. Even after 25 years I would never learn C++ just to do one major project :)


    :cool: :cool: :cool:
  9. DropOut


    I agree with RedManPlus. I work with C++, VB, C# and some other languages. C++ is the most difficult even after using it for years. I now only use it when trying for the high speed execution of number crunching, or when there is no way around it.

    If you want to build any application and concentrate on the functionality, use an easier language. If you want to become a software engineer, learn C++, then all the languages you will use in the real world will come easier.

    From you're other posts, it sounds like you want to implement you're strategy more than you want to become a SW guru. Visual Basic is an easy language to get a handle on, plus it is much like the VB for Applications (VBA) built into Excel. However, support for VB6 is waining, so learning VB.NET or Java/C# may make a better long term investment of your time learning a language.
  10. ids


    I have to agree that Delphi is pretty much dead. I still miss it though. You have not to be fluent in C++ to use C++ API. You just need to understand what calling convention is and how to map C++ types to Delphi. Sorry, I do not have a good example right now but I made a pair of serious projects back in the last century that involved Delphi calls of C++ DLLs and Active X components. It was not that hard. I also believe that if you want to grow as a programmer, you better use C++.
    #10     Mar 4, 2006