Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Programming

Ask Slashdot: Is C++ the Right Tool For This Project? 296

ranton writes: I am about to start a personal project which I believe should be done in C/C++. The main reasons I have for this are the needs to manage memory usage and disk access at a very granular level and a desire to be cross-platform. Performance is also important but I am unlikely to spend enough time optimizing to be much faster than core libraries of higher level languages.

On the other hand, network access is also a critical part of the project and I am worried about the effort it takes to make cross platform code for both network and disk access. I have been working in the Java / C# world for the past decade and things like TCP/IP and SSL have just been done for me by core libraries. Do libraries like Boost or Asio do a good job of abstracting these aspects away? Or are there other options for doing granular memory and disk management with more high level languages that have better cross-platform library support? I am willing to brush up on my C/C++ skills if necessary but want to spend as much time as possible developing the unique and potentially innovative parts of my project. Thanks for any advice you can provide.
This discussion has been archived. No new comments can be posted.

Ask Slashdot: Is C++ the Right Tool For This Project?

Comments Filter:
  • python with psutil (Score:3, Interesting)

    by sandGorgons ( 1528485 ) on Wednesday June 24, 2015 @02:17AM (#49975159)
    consider using python with py2exe, psutil and mmap. you may find what you are looking for !
    • by The_Dougster ( 308194 ) on Wednesday June 24, 2015 @02:58AM (#49975285) Homepage

      Python can sure get you up and running like yesterday with a quick and dirty prototype. Bang it out in python and then port it to C++ at your leisure, if you even need to.

      Having a working solution *right now* is pretty nice, even if your ultimate goal is a C++ binary.

      • by dgym ( 584252 ) on Wednesday June 24, 2015 @06:55AM (#49975941)
        Having a working Python implementation will also give you a better understanding of which parts are performance/memory sensitive. This may help guide you while rewriting in a different language, or you may find that you can achieve your goals just by hot spot optimizing your Python code using some of these fine tools:

        http://www.numpy.org/ [numpy.org] can give you compact arrays of unboxed types and fast operations over them.
        http://cython.org/ [cython.org] is an amazing and versatile tool which allows you to compile your Python code, optionally add type information, optionally manage memory yourself, optionally interact with C/C++ code very easily.
        OpenCL/CUDA if your work can take advantage of them.


        If the standard Python runtime isn't simply too big for your project I can't recommend Cython highly enough. Only tackling the parts that need it is one of the keys to successful optimization and Cython lets you do just that even if it is just one loop in an otherwise pure Python file.
  • by TsuruchiBrian ( 2731979 ) on Wednesday June 24, 2015 @02:21AM (#49975169)
    I would recommend using Qt for a cross platform framework. I haven't tried every C++ framework, but of the ones I have tried, Qt is by far the best.
    • by Noughmad ( 1044096 ) <miha.cancula@gmail.com> on Wednesday June 24, 2015 @03:48AM (#49975427) Homepage

      Agreed. Not only it makes programming easier, the code also tends to be more similar to Java and C#, which he has used before.

    • by GNious ( 953874 )

      Qt5 would abstract the bits that are platform specific, while still allowing low-level control where desired.
      Unless there is some specific reason not to use Qt, it would seem to match his requirements nicely.

    • by gladish ( 982899 ) on Wednesday June 24, 2015 @07:12AM (#49975977)
      I think that really depends on your definition of "best". I've used Qt (and still use it sometimes) and initially I thought I liked it, but over time began disliking it a lot. For one, I've seen the signal/slot mechanism used to create really hard to understand code. I've seen memory allocated via new and then the pointer passed into emit only to be deleted on the other end of a signal/slot chain.

      Posted says, "needs to manage memory usage and disk access at a very granular level and a desire to be cross-platform". Stdio/stdlib takes care of that. I don't see any mention of GUI, so if GUI is necessary, then I'd say, ya, just use Qt, because it probably is the best and it does come with a lot of other stuff, so you when in Rome...

      Boost. What you'll get from boost is the filesystem stuff. It'll be similar in functionality as System.IO.FileInfo System.IO.Directory in .NET, but way more confusing to use. At least at first.

      It's funny, the filesystem api was proposed over 9 years ago for c++.

      http://www.open-std.org/jtc1/s... [open-std.org]

      • by BytePusher ( 209961 ) on Wednesday June 24, 2015 @07:19AM (#49975999) Homepage
        If you're not writing GUIs there's no need to use Qt's signal slot system. Also, since C++11 you're able to use member function pointers instead of their mocking framework(thus you get compiler errors vs printouts at run-time.) And, yes, W(here)TF is the C++ filesystem std library?!?!
        • If you're not writing GUIs there's no need to use Qt's signal slot system.

          I would disagree. Even in a daemonized application the Qt (WxWidgets, Gtk, and Boost) signal/slot system works wonders.

          Like with anything else, it can be abused, but it is by far superior to alternatives like the Message Maps (Gtk, MSVC, WxWidgets).

      • If done correctly signals and slots make very maintainable code. They allow you to decouple classes (remove dependencies from classes upon eachother), as opposed to mechanisms like callbacks/handlers. This leads to more modular code.

        I've seen memory allocated via new and then the pointer passed into emit only to be deleted on the other end of a signal/slot chain.

        That's a c/c++ problem, not a Qt problem. You can't stop people from writing bad code, but you can make it harder.

        As far as memory management goes, Qt provides both QSharedPointers, which will perform reference counting and delete themselves upon the reference count reacing z

    • Also agree. I personally find the only thing more elegant/friendly about python is modules vs headers and a generally robust toolbox of libraries. Qt get's you the majority of that and you get all the control you need without awkward language bindings. As another poster points out, RAII with smart pointers is pretty much superior to garbage collection in every way.
    • by ranton ( 36917 )

      There is no UI required for the project, although I realize you can use modules like QtNetwork without the UI libraries. I am a bit worried about tying myself too closely to the QT event loop. Can anyone provide any insight on if the event loop will complicate concurrency throughout the rest of the application or if it is even necessary? I have briefly read through some documentation but I am most looking for advice from someone who has used it before and has dealt with the gotchas that every framework has.

      • by turbidostato ( 878842 ) on Wednesday June 24, 2015 @09:33AM (#49976781)

        You know there's no need for a software project to be coded in any single programing language, don't you?

        You can properly modularize and then mix and match your project as different modules -or even programs, in different languages, i.e.: C for low level hardware access (and abstraction: first you say you want it multiplatform but then your message implies a monolithic approach !?), maybe C++ for the main logic, python to glue everything together, a toolkit like Qt for a GUI -maybe you don't need it now but it results in a good addition down the road, etc.

      • You are not forced to use the Qt event loop. You can use all blocking I/O and lots of threads if you really want. I personally find the event loop approach to result in more elegant code, and this concept is not unique to Qt. The logical mechanism of the event code is transferable to other frameworks, even if the actual code is not.

        There is no way to use a framework without writing code that is specific to that framework. My advice is to just pick one and drink the kool-aid. One way to get crappy code

      • There is no UI required for the project, although I realize you can use modules like QtNetwork without the UI libraries. I am a bit worried about tying myself too closely to the QT event loop. Can anyone provide any insight on if the event loop will complicate concurrency throughout the rest of the application or if it is even necessary?

        The QT Event Loop actually makes concurrency far easier. You can start each thread with its own event loop, and just pass objects back and forth between the threads using Signals/Slots. The Qt Signal/Slot automanages moving the objects between the event loops, and it all just works.

        So you can easily have one thread that just reads data from disk, while 5 other threads receive the data to process, all using Qt signal/slots and not give a lick about which thread it's running in.

        Furthermore, if you need

  • by Anonymous Coward

    You haven't provided nearly enough information to make a decision here. You haven't defined what you mean by "granular level", whether you need a UI, what functionality you have to provide.

    • by ranton ( 36917 )

      You haven't provided nearly enough information to make a decision here. You haven't defined what you mean by "granular level", whether you need a UI, what functionality you have to provide.

      The project is very similar to writing an database management system. I didn't want to get too much into the details so people aren't commenting about the virtues of the project itself.

      By granular level I mean I cannot be in a managed environment like the JVM or .Net JIT compiler. I need to be able to allocate and release memory manually. I have done some prototyping in Java and C# hoping I could control garbage collection enough for my needs, but it isn't possible (or at least I can't figure it out).

      There

      • by SQLGuru ( 980662 )

        Why don't you mix languages? Write the pieces that are easier in the "higher" level languages in those (Java or C# since those are what you know) and write the pieces that need C/C++ in one of those languages? C# can call out to unmanaged code fairly easily but makes all of the simple tasks easy......I only do minimal amounts of Java, but I'm sure it can too. Back in the day, I used to write some C and every once in a while break out some ASM for those routines that needed to be closer to the hardware...

  • C or C++ (Score:5, Informative)

    by Anonymous Coward on Wednesday June 24, 2015 @02:25AM (#49975187)

    Decide whether your project is to be done in C or C++. Choose one and embrace it.

    There's an illusion that because these two languages share a common origin that they're somehow the same, bundled together as "C/C++". Especially since C code can often be valid in a C++ compiler.

    In reality, the good programming styles in each of these two languages differ substantially. Start wedging bits of C code inside a C++ program and you'll soon find yourself fighting the language and core libraries. Likewise, the conventions for core concepts like objects and linked lists in C are somewhat different to C++ and with their own strengths. Both are powerful languages for large projects, but not the same language.

  • by thesupraman ( 179040 ) on Wednesday June 24, 2015 @02:26AM (#49975189)

    Then C++ is almost certainly not the language for you, unless it is a pure learning experience.

    Really.. C++ is a relatively high commitment language, and performance is one of its mainstays, however you dont feel you will spend much time optimising it?
    If you cannot look quite quickly over the descriptions of Boost/ASIO and see what they do (and dont) bring to the table, then you will be fighting a very
    uphill battle.

    The reference to TCP/IP being 'done for you' is worrying.. do you think people program raw TCP in C++?

    If you value your project at all then I would suggest C++ is not sounding like your solution.. especially if you need cross
    platform. Your reasons seem almost to be reasons NOT to use an unfamiliar language.

    As almost everything else has equal or better cross platform support, it seems to me like you need to look more closely to what you mean/need by
    'granularity' and perhaps change your mentality using familiar languages, and the solutions for problems in those areas.

    • Furthermore you should ask yourself why you would need such a low level access when low lever performance clearly isn't the main issue. Consider using available main stream OSS APIs and libraries to allow higher abstraction level. You could then contribute to improve the used library.

      Reuse components that others developed. It will most likely render you more effective and efficient. You would also pay the component developers back at least through lips service. The components will improve. Everyone will b

    • by mwvdlee ( 775178 ) on Wednesday June 24, 2015 @02:52AM (#49975271) Homepage

      it seems to me like you need to look more closely to what you mean/need by 'granularity' and perhaps change your mentality using familiar languages, and the solutions for problems in those areas.

      This.

      "Very high" is subjective. I've had programming tasks where every single byte of memory counted and was optimized for. But I've also had tasks where this meant I'd just have to keep memory usage down to a few MB; totally different interpretations of "very high granularity".

      Since you'll probably need to have a trade-off between memory and performance, which is more important? Can you spare a few KB to make your code run 2x faster? How about a few MB? Does code need to run as fast as possible or just fast enough to keep pace with the GUI?

    • by rwa2 ( 4391 ) *

      Word.

      I've been pretty happy using python for prototyping, and it's actually fairly fast using a JIT wrapper like pypy. And the C++ bindings are there for when you have to rewrite one of your modules for performance. There's even an interface to Boost and maybe even ASIO if you want to tinker with those for some reason... I played with some Boost libs briefly years ago but found they added too much complexity and got by fine using much cleaner "pure" python modules instead.

    • by Kagetsuki ( 1620613 ) on Wednesday June 24, 2015 @07:25AM (#49976025)

      I program raw TCP in C++.

      I think maybe you meant to say "do you realize people program raw TCP in C++?" or something like that.

      Also, I agree with you that the person asking the question here should probably look for something else. It sounds like they are in over their head and I don't see them optimizing multi-threaded networking applications with real time IO in valgrind any time soon (though it sounds like an interesting Friday afternoon for me).

    • by ranton ( 36917 )

      Really.. C++ is a relatively high commitment language, and performance is one of its mainstays, however you dont feel you will spend much time optimising it?

      I started my career working with C++ so I am not new to the language, but my work used very little of even the standard library let alone other third party tools. I used in house libraries that were already written. I was also a novice at the time, so a good deal of the last few months has been spent reading material like Effective Modern C++ and others in the Effective C++ series, along with a throwaway project to practice while reading.

      I am a firm believer that most performance is in the algorithms not th

      • Okay, basically I need to be able to allocate and release memory manually and without waiting for any garbage collection. I need complete control over concurrency and memory sharing, and as little overhead as possible when accessing the hard disk. I have not been able to find a way during prototyping to control memory enough in Java or C#. A language with a great cross platform library but no memory management would be perfect, and right now C++ is the only language I know of that comes close to those requirements.

        . Since you mentioned you have existing libraries, etc - QT certainly seems to be very beneficial here. With the QSharedPointer types (weak, strong, etc) and concurrency functionality (QtConcurrent, QtFuture) it seems to have the main tools you're looking for, and it will integrate well with other projects in that bringing in an existing library won't be much of an issue (well, unless it's a MSVC COM or something like that; those would need to be re-written). The main caveat is that it's a little harder to

      • I'm someone who gets contracted to optimize this kind of code. Unfortunately like most good technical problems, the answer is "it depends."

        Pulling in some quotes from your various replies and comments scattered across the discussion:

        My perfect solution would be developing it in C# while having complete control over memory allocation and release ... Linux+Windows ... I need to be able to allocate and release memory manually. I have done some prototyping in Java and C# hoping I could control garbage collection enough for my needs, but it isn't possible

        Since your replies are talking about cross-platform C#, that almost certainly means Mono instead of the MS implementation. That's a good thing for you.

        For your garbage collection concerns, Mono ships with two garbage collection implementations. One is SGen, the other is Boehm

  • by rippeltippel ( 1452937 ) on Wednesday June 24, 2015 @02:29AM (#49975195)

    You said nothing useful about your project

    C++ could be a good choice for all the things you've mentioned. Networking is not an issue, as there are many open source libraries (e.g. libcurl - http://curl.haxx.se/ [curl.haxx.se]), and using Boost is often a good thing anyway. Also, there are at least two good memory allocators: tmalloc (http://goog-perftools.sourceforge.net/doc/tcmalloc.html) and jemalloc (http://www.canonware.com/jemalloc/) so you may not need to write your own. (I assume that the above open source licenses are good for you, but they are just examples...)

    However... I doubt that your project will be only Network + Memory + Disk. What else do you need? Some UI? Should it interact with the Web? Or with services in the Cloud? There's no easy answer to your question without knowing what else you need, and I wouldn't even exclude a hybrid-language approach (e.g. C++ / Python / JavaScript*).

    * Before someone starts ranting about JavaScript having to run in a browser: NO - JavaScript runs perfectly fine withouth a browser, and can easily interact with C++. Have a look at V8 or SpiderMonkey, just to name some JavaScript engines.

    • by mishehu ( 712452 )
      In fact, to support your comments about Javascript, in the FreeSWITCH [freeswitch.org] project, we have a VoIP softswitch that can directly interact with Javascript using mod_v8 (used to be spidermonkey), and can also interact with lua, perl, and other languages - scripted, compiled, managed, etc. in a similar fashion.
    • by ranton ( 36917 )

      The project is very similar to writing an database management system. I didn't want to get too much into the details so people aren't commenting about the virtues of the project itself.

      There is no UI component; it could be thought of as a cloud service.

      My perfect solution would be developing it in C# while having complete control over memory allocation and release. I have done extensive testing using System.GC.Collect() to manually control garbage collection with no luck.

      I started programming with C++ in hi

  • The main reasons I have for this are the needs to manage memory usage and disk access at a very granular level and a desire to be cross-platform.

    You can pick one of the two and make no promises about the other.

    Or does "cross-platform" in this context mean "Linux+Windows"?

    • by ranton ( 36917 )

      Or does "cross-platform" in this context mean "Linux+Windows"?

      Yes.

      Sorry I guess I am a bit too old and still don't think of mobile when I say cross-platform. But not old enough to immediately think embedded when saying cross-platform. I have been living purely in the desktop / server world for over a decade and that is where my project resides as well.

  • you want everything -- memory, disk, network, speed -- and c++ will give you all of that just fine. And it'll give you the giant learning curve, and force you to take every hard road from start to finish.

    Have you considered using perl -- which is pretty well cross-platform -- and writing the few granular components in c++, bootstrapped into perl?

    That's pretty standard for i-want-to-use-perl-but-i-need-this-part-to-be-faster.

    • Are you trolling? For anyone not already intimately familiar with the process, the vertical learning curve of writing Perl bindings for C++ code will cause more pain, anguish, wailing and gnashing of teeth than writing in either pure Perl or pure C++. You will also gain nothing in portability: in fact you will lose, because portability will be the lowest common denominator of both Perl and C++ (I won't argue over which is lower to start with, both can be high with the right libraries), with the added headac

  • Depending on how hard-core object-oriented you wish your program to be, plain old C might be a much better option, especially if you everything can just be command-line only and will not need a GUI.

    Otherwise, and I'm almost loathe to mention these, C# and Java might be even better ways to go.

    C++ is needlessly complicated.

    • Re: (Score:2, Insightful)

      by Anonymous Coward

      You can treat C++ as the name implies; plain old C with some extra stuff you may or may not use.
      Nothing in C++ is forcing you to create object oriented code.

      • by Damouze ( 766305 )

        But then you are simply programming in C.

        Nothing wrong with that, but why use a C++ compiler when a plain C compiler would spare you so much overhead?

      • You can treat C++ as the name implies; plain old C with some extra stuff you may or may not use.
        Nothing in C++ is forcing you to create object oriented code.

        Objects are the main benefit of C++ over C.

        • by Xrikcus ( 207545 )

          Only in the most basic sense of data encapsulation. Most people are thinking of inheritance, run time polymorphism and a notion of representing concepts with objects when they talk about OO, and C++ requires none of that.

        • Objects are very useful, but I'd say the main benefit is the template system which underlies the STL.

          • Templates I think were a mistake to add to C++. It has removed a lot of object orientation from C++ programs, and it has bloated things up tremendously because of popular styles of using them and due to STL. Templates are essentially smart macros. You end up with duplicated code for each instantiation, and with some styles even the functions themselves are inlined. This only works because this style is big on the PC where there is massive amounts of RAM and cache space to soak up the inefficiencies. Th

  • by Zumbs ( 1241138 ) on Wednesday June 24, 2015 @02:51AM (#49975267) Homepage

    It is possible to use C++ with Java. Try to look at Java Native Interface (JNI). It comes with a performance penalty on each call across the interface, but if you are using it for networking, the penalty will be negligible.

    If you are working on Windows, it is possible to do the same with C# using a CLI interface wrapper. I have no idea if that trick works on Linux/Mac.

    • by Kagetsuki ( 1620613 ) on Wednesday June 24, 2015 @07:19AM (#49976003)

      JNI is the absolute most awful native interface system I have ever seen. If you absolutely must go the JNI route may I recommend using SWIG to generate things for you. It will require some additional wrapping but at least it won't make you want to end your own life.

      As for performance penalties you'll have the additional overhead of a JVM as well. The whole setup you are proposing I'm guessing you've implemented before and are comfortable with but to me it sounds messy and unnecessary - especially with so many good networking libraries available for C++.

  • 'Cross platform' and 'manage memory usage and disk access at a very granular level' do not readily go together. And not in Java either. Abstract your 'granular access' away in a C (I said 'C', not 'C++') library of your own. Use a lot of #ifdefs. On top of that, build in whatever you want.

    • by sqlrob ( 173498 )

      Absolutely positively do not use a lot of #ifdefs, you're asking for a lot of hurt.

      Move the platform specific code into files, and then use abstractions in the main code, pull in the different implementations in the make file. You'll have just a few #ifdefs in the main code for the right header files.

      Do frequent compilation across the platforms, because you will screw it up. Make sure to have plenty of tests for the different behavior between platforms.

  • Why not? (Score:4, Informative)

    by mrthoughtful ( 466814 ) on Wednesday June 24, 2015 @03:31AM (#49975373) Journal

    I love C++. It will take you a a couple of years to get good at it, but as you say - it's a personal project, and I am guessing you've had enough of Java.
    However, if you are doing any sort of front end GUI for it, then don't go there. Stay with Java. There is no unified FE GUI for C++ which I could recommend.
    Likewise, many of the suggestions above seem to have not read that you already know Java.

  • I don't think you know enough to know that yet. Or at least if you know enough you haven't told us enough to justify it. As cliche as it is, I'm going to quote Knuth: "We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%"

    I suggest you just do a prototype in whatever's easiest, fastest, and most flexible. Python, Ruby, C#, whatever you like. Get it working . Then see if it's slow a

  • You mention 'C/C++', and I think you need to realize that the two don't really mix well; in my experience, you go with one or the other, simply. True, you can use C style practices in C++, but then what's the point of using a C++ compiler?

    I think there are many, excellent reasons to choose C++ for a project, but perhaps not the ones you list. Things like control over memory allocation, cross-platform and networking may not in theselves be compelling reasons for choosing C++, as they can be handled easily en

    • C and C++ mix very well. Being able to use C API straight from C++ code, was design goal #1 from day 0 when C++ got invented

      Using C++ from C, is a little less straightforward but quite doable. I wrote a small article years ago on how to do it easily. Check for yourself if you are curious

      Idioms for using C++ in C programs [olivierlanglois.net]

      concerning OP question. Despite I'm a C++ person, I would recommand doing it in C first. Yes, there are C++ framework such as Boost but I have never liked these frameworks because it bloat

      • Do NOT start in C if you're thinking of maybe going to C++ later. If you start writing in C, turning it into good C++ is going to require partial or total redesign. Pick C or C++ (I strongly recommend C++) and go ahead.

  • Why? (Score:4, Insightful)

    by DrVxD ( 184537 ) on Wednesday June 24, 2015 @04:04AM (#49975473) Homepage Journal

    The main reasons I have for this are the needs to manage memory usage and disk access at a very granular level

    And why, exactly, do you imagine you need these things?
    (You may well do - but you don't give a reason for it, so it's entirely possible that you don't need to manage those things on a granular level)

  • by DrXym ( 126579 ) on Wednesday June 24, 2015 @04:24AM (#49975523)
    Personally I wouldn't choose C++ or C unless there was very a strong justification. If your code spends more time waiting for something to happen than actually doing something, then you shouldn't be using a low level language. If reliability is more important than raw performance then you shouldn't be using a low level language. If portability is important then you shouldn't be using a low level language. Conversely if you need to do lots of IO and / or control the file format, or interact with system / kernel services, then perhaps a low level language is suitable.

    Boost is a very powerful addition to C++ but that doesn't mean it's as easy to write code as it is in a high level language. e.g. boost's asio is extremely complex and even doing something simple with it like setting a timer is far more pain than other languages. Boost doesn't implement stuff like web sockets or other things either so it's no good on its own without other libraries. If I had to write something in C++ which was performing in a role that would more naturally fall to something like C# or Java, I'd probably use the QT library instead but only after being certain that I needed C++ to begin with.

  • No. (Score:4, Interesting)

    by viperidaenz ( 2515578 ) on Wednesday June 24, 2015 @04:45AM (#49975575)

    If you're better at Java or C#, use that.

    Sometimes the right tool for the job is the tool you know best.

    If you're not confident at what you know, perhaps the best tool is someone else.

  • Use one language (Score:5, Insightful)

    by jones_supa ( 887896 ) on Wednesday June 24, 2015 @05:26AM (#49975657)

    I am about to start a personal project which I believe should be done in C/C++.

    I cringe when someone says "C/C++". Sort that out first by choosing one language for your project. Either write lean and clean pure C code, or fully use the proper abstractions of C++ to write memory-safe and easily-maintainable code, but don't make an unprofessional crusty mix of the languages.

  • Check out http://cython.org/ [cython.org]. This project will enable you to write high level logic in python and drop to C in the performance critical sections of your code.
  • by Kagetsuki ( 1620613 ) on Wednesday June 24, 2015 @07:14AM (#49975987)

    ASIO is in fact part of Boost now and I personally like it. The thing you need to remember though is that ASIO is not an HTTP client or really any type of client at all - if you want to do HTTP you'll need to write the HTTP headers and handle chunking yourself. That's actually not so hard though. For cross platform SSL you just need to use Open SSL which is actually pretty simple in C++.

    Basically if you want really fine control of your network streams or are using things other than just HTTP then ASIO is going to be what you want. If you just want to have something handle HTTP for you then there's quite a few other libraries out there you can choose from.

    • That is a very poor analogy. It's nothing like driving between two cities. Designing and writing software is more like designing/building a vehicle you want to sell to others. Choosing a language and libraries is like choosing factory machines and tools needed to manufacture the vehicle, deciding which parts you're going to buy elsewhere versus make in-house, and so on. These decisions can have major impacts on how quickly you can get the car to market, how hard it is to add certain features to the vehicle,

  • It seems like having to make a trip by car between two cities and trying to decide which type of car to use?

    So does it really matter if you choose a Ford, Hyundai, Tesla, Ferrari, Saab, Toyota, etc.? In the final analysis, wouldn\t any of those vehicles get you there just fine? Why not go with what you're comfortable with?

  • I am getting up in years, but find it interesting that no one mentioned COBOL but me. :)
  • Since you're not saying what kind of tool/programm you're trying to build I presume it's some kind of performance critical focused but non-trivial application. So a compiled language probably is the best choice - you won't be dependant on some VM stuff or an interpreter.
    The real C family of languages (I'm excluding C# with the 'real') isn't the worst choice for this sort of thing. In fact, it's just about the only choice. With C, C++ and Objective-C left to choose from, C++ comes to mind as a tried and true

  • As a systems programmer, I have used both C and C++. When using C, I (and my team) needs to expressly have the discipline to embrace the tenets of C++ vis-a-vis encapsulation, maybe some facade dp thrown in. Most of the rookie mistakes are easier to spot in C, but there is a lot more code to be written in C to achieve the same effect (writing & using an object agnostic linked list for example).
    When using C++, things are hidden in plain sight, and rookie mistakes are easily overlooked, because someone fo

  • Have you actually demonstrated that the higher-level languages you are more familiar with just can not possibly do the job? And keep in mind both RAM and disk are cheap, so "just add more" may work if saving space is your motivation for "granular control".

    Whip up a testbed in the higher-level languages you are more familiar with to simulate a load test, and see what sort of performance you get. Zero bells/whistles, just "how much of data that vaguely resembles what I'll be seeing can I shove through the p

  • You say you need to manage the memory yourself, so I'm going to believe you. I believe this completely eliminates garbage collected languages from consideration*, and that's most languages these days. Aside from C/C++, I think you still have Rust, D, and assembly as contenders. You might be able to use Java with with sun.misc.Unsafe, but that is not really recommended.

    Not knowing too much about these languages, I would tend to think Rust might be a good choice. People seem to like it. I believe legacy

Understanding is always the understanding of a smaller problem in relation to a bigger problem. -- P.D. Ouspensky

Working...