The Daily WTF: Curious Perversions in Information Technology
Welcome to TDWTF Forums Sign in | Join | Help

Search

Page 1 of 65 (646 items) 1 2 3 4 5 Next > ... Last »
  • Re: My heart bleeds

    [quote user="Groaner"]Also, I seem to remember Alex having an opinion on relying on finally.[/quote]  Yeah, that's about not being able to rely on it to preserve persistent invariants in the face of failure, the way ACID guarantees in a database do. I never suggested doing that.  But for preserving program invariants in ...
    Posted to "Side Bar" WTF (Forum) by Mason Wheeler on 04-12-2014
  • Re: My heart bleeds

    [quote user="Groaner"][quote user="Salamander"][quote user="Groaner"] If you're worried about subsequent calls throwing (without catching them), why not do something like this:[/quote] You've changed the actual behaviour of the code so that it no longer propagates exceptions. [/quote]  Fair point, but ...
    Posted to "Side Bar" WTF (Forum) by Mason Wheeler on 04-12-2014
  • Re: My heart bleeds

    [quote user="dkf"][quote user="anotherusername"]Yes, it can be done because you didn't use goto/exit/return inside of the try...finally block, so you didn't need to use finally at all.[/quote]You don't know if there are any exceptions about.[/quote]  Yeah.  For those unfamiliar with the construct, the ...
    Posted to "Side Bar" WTF (Forum) by Mason Wheeler on 04-12-2014
  • Re: My heart bleeds

    [quote user="fatbull"][quote user="Mason Wheeler"]Can it be done in C++?[/quote] Sure. The basic idea is to create a utility class which calls a user-defined function in its destructor, e.g. ScopeGuard 2.0 or a smart pointer with custom deleter. This is a lot easier with C++11 lambdas. Hide the boilerplate code behind a macro ...
    Posted to "Side Bar" WTF (Forum) by Mason Wheeler on 04-12-2014
  • Re: My heart bleeds

    [quote user="Groaner"]  [quote user="joe.edwards"][quote user="aristurtle"]Also, because std::shared_ptr and std::unique_ptr are in the standard library, you can't laugh in a C++ weenie's face when he starts talking about "RAII". (You need to wait until he starts saying that shared_ptr is ...
    Posted to "Side Bar" WTF (Forum) by Mason Wheeler on 04-12-2014
  • Re: My heart bleeds

    [quote user="morbiuswilters"][quote user="dkf"]Merely having a custom allocator is not a WTF.[/quote] I honestly think that in this day and age, it is. If you're writing your memory allocator (or even using a third party one), that says something about the maturity of the platform as a whole.[/quote] Not really.  I ...
    Posted to "Side Bar" WTF (Forum) by Mason Wheeler on 04-11-2014
  • Re: Long Life bug : Do not use the letter 'j'

    [quote user="mikedjames"]I am working on a legacy application, coded in Borland C++ version 5, and using Microsoft CAB files to deliver compressed 'directories' of files used in product label and document printing.  The entirety of this is a WTF and is being replaced with C#/.Net  These labels and documents are ...
    Posted to "Side Bar" WTF (Forum) by Mason Wheeler on 04-11-2014
  • Re: My heart bleeds

    [quote user="bstorer"][quote user="aristurtle"] Yeah, C++11 adds them (#include <cstdint>). In general, C++11 smooths out some of the more obvious failures of the standard library, but the fundamental problems with the language are still there. It's like spraypainting over a rust spot on your car. [/quote]C++11 is ...
    Posted to "Side Bar" WTF (Forum) by Mason Wheeler on 04-10-2014
  • Re: My heart bleeds

    [quote user="morbiuswilters"][quote user="too_many_usernames"]And I really wish C did have fixed-size data types.[/quote] Anymore I try to use stuff like int8_t or uint8_t as much as possible. I avoid the ambiguously-sized types like the plague.[/quote] ...which is great, since you know about them.  But why do you know ...
    Posted to "Side Bar" WTF (Forum) by Mason Wheeler on 04-09-2014
  • Re: My heart bleeds

    [quote user="Snooder"][quote user="blakeyrat"] PASCAL can meet those requirements, and is a better language than C. Yeah. I said it. I stand by it.[/quote] Fuck you. I learned how to code with Pascal and C is fucking magnitudes better. I can't remember why right now since I haven't written a line of Pascal in 12 ...
    Posted to "Side Bar" WTF (Forum) by Mason Wheeler on 04-09-2014
Page 1 of 65 (646 items) 1 2 3 4 5 Next > ... Last »
Powered by Community Server (Non-Commercial Edition), by Telligent Systems