Mordachai

Mordachai Mordachai

Niner since 2013

Comments

  • Modernizing Legacy C++ Code

    One massive reason that the STL algorithms are underused is that their interface sucks.
    Where "sucks" means "requires odious use of being+end pairs, insead of the infinitely more sensible use of the container itself".
    auto the_max = std::max_element(v);  // <- this is what the library should offer.  underutilization is an absolutely direct result of this failure.

  • Interactive Panel: Ask Us Anything

    I'd like to understand better why int over unsigned.  Personally, I've never liked signed values unless there is a valid reason for them.  e.g. count of items in an array, or length of a string, or size of memory block, etc., so often these things cannot possibly be negative.  Such a value has no possible meaning.  Why prefer int when it is misleading in all such cases?