Jump to content

David Heffernan

Members
  • Content Count

    3710
  • Joined

  • Last visited

  • Days Won

    185

Posts posted by David Heffernan


  1. 4 minutes ago, Mark- said:

    > Yes, I can't keep developing the package without some income.

     

    No, I am purchasing a product (as is), not funding your future work.

     

    > But if you had read a bit further it says:

     

    I read the complete page.

    Why should I be forced to take steps to end a subscription I did not want?

    Why not have a checkbox, when ordering, to provide for a subscription verse forcing a subscription?

    If you don't like the terms, don't buy the product. We all have a right to set the terms of any products that we sell. 

    • Like 1

  2. 2 hours ago, vfbb said:

    But the optimization of creating it with the capacity is valid considering that the performance increases is on average 30%, both for small collections and for large ones.

    I'm not suggesting that you don't preallocate with a sensible capacity if you know it. I would always do that. In multithreaded code especially, minimising heap allocation is always advisable. 


  3. Ofc, you don't have to use the RTL dictionary. The spring4d dictionary has a number of powerful features. 

     

    I don't think the growth is such an issue. Collisions can be, and better hash and proving would help. The issue for small collections is simply the constant of proportionality. O(1) can be slower than O(log n) for small enough n. 


  4. Much of the development I do is refactoring. Not for its own sake, but to enable a new development. Typically this means refactoring existing code, relying heavily on the testing of that code, so that the new development can be added easily. Often the bulk of the time is spent refactoring and then the new development is trivial. 

     

    In other words, even when code is well factored, it often needs to be refactored. 

     

    Also, its not at all the case that replacing standalone functions with classes always makes your code better. Don't be afraid to have standalone functions if that is the right design. 

    • Like 3
    • Thanks 2

  5. They all do different things. Rather than have us explain this, did you read the documentation? 

     

    I don't think that item 3 is very widely used. However meta classes, item 2, is widely used. Classic example is the streaming framework. It is used when you need to instantiate a class whose identity is only known at runtime. When streaming properties the framework reads the class name, looks it up using RTTI and then uses meta classes to instantiate the instance if that dynamically determined type. Always seen with virtual constructors. 

    • Thanks 1
×