Hacker News new | ask | show | jobs
by bsdetector 4375 days ago
> In my haste, I'd not noticed, I'm queueing up all of my rows close statements for the function end, which happens after the for loop, which opens way more than the allowed connection limit (about 100 in this case).

Here I thought this was going to be about defer and how it is error-prone compared to RAII and how it is a modern-day alloca with the same type of scope problems, like being unsafe to use in loops, and how it has a weird order of execution with arguments being evaluated immediately and statement evaluated later on.

Instead it's just about having poor project management. A missed opportunity I guess.

1 comments

Or... lack of project management.

There is definitely something to be written on that, but - well I'm not the guy. Yet.