Jump to content
  • Advertisement

realh

Member
  • Content count

    75
  • Joined

  • Last visited

Community Reputation

346 Neutral

About realh

  • Rank
    Member

Personal Information

Social

  • Github
    realh

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. realh

    C++ IDEs - a rant

    I've had a look at the docs for VS Code. It looks great, but sadly it doesn't have Intellisense for C/C++ yet. Does anyone know roughly when that might be working?
  2. realh

    C++ IDEs - a rant

    There is a very valid school of thought that if you can't see the top of your function while editing the bottom of it your function is too long, but I find myself breaking that rule all the time. If you stick to it for complex algorithms you'll find yourself having to replace large collections of local variables with one-use structs to sanitise passing them between many small functions.   Besides that you often need to perform some calculations on parameters to get an initial value for a local variable, and being forced to use a separate declaration and initialisation is a waste of screen space. Hm, Intel. They seem OK in this new age of even MS embracing open source, but can they really be trusted not to generate pathological code that runs much slower on AMD? They shouldn't be that desperate as far as AMD are concerned, but they are with ARM.
  3. realh

    C++ IDEs - a rant

    I've found Tango makes a good basis for a colour scheme, even if you limit yourself to the few official colours. (There also seems to be an unofficial consensus about adding turquoise).
  4. realh

    C++ IDEs - a rant

    The trouble with using an old VC for C is the lack of support for C99. OK, it doesn't make such a dramatic improvement to the language as C++11, but I do take for granted being able to declare variables in the middle of functions. Once I was trying to compile some C in VS2012 (IIRC) and got an error message because of that. I couldn't work out what the message was trying to say so I looked up the numerical code. According to MS' official documentation this error was caused by trying to dereference a struct member via a typedef of the struct, which is illegal! Sometimes the documentation should be written by a programmer after all.
  5. I'm interested in why the pointer to the object is stored in each smart pointer instead of in the control block. Has that been found to perform better overall than making each smart pointer a single word size, but requiring an extra indirection?
  6. In that respect it was a good job I think. It appeared at just the right time for me. I needed some sort of event-listener setup but I had no experience of variadic templates so wouldn't have thought of this solution. Reimplementing it with a few customisations of my own helped me understand it better.
  7. About the problem Bearhugger raised, ie deleting an Event or disconnecting/deleting a delegate during a handler. I don't think deleting an Event during a handler is something that most people would want to do, so you could probably get away with forbidding this in the documentation, although hopefully someone might find a way to code around that - perhaps wrap the Event in a shared_ptr?   I think there's an easy way to deal with delegates disconnecting themselves or each other while being called. Instead of removing a disconnected delegate from its Event's vector straight away, replace it with a nullptr, which can easily be skipped while iterating through the list and removed afterwards.
  8. I don't think AbstractDelegate's add and remove methods should be virtual, because add() is called (via Event::connect()) from ConcreteDelegate's constructor.
  9. I don't understand why there are two survivor spaces, why one always has to be empty, and why and when the system moves objects from 1 to 2. Please could you explain that in more detail?
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!