3 ms·
I should have also said, I suppose, that cgitb is less needed by Nim because the static typing catches more errors at compile-time. Indeed, for CGI programs, i
by cb321 1y ago
I should have also said, I suppose, that cgitb is less needed by Nim because the static typing catches more errors at compile-time. Indeed, for CGI programs, it might be wise to use the `{.raises: [].}` pragma to forbid successfully compiling if you even could raise at all, formally obsoleting any utility cgitb would have had. All just informational if anyone is tempted to write CGI programs in Nim. :-)
- kragen 1y agoI never use cgitb in Web programs in Python though. I use it in console programs so I can just read what the error is instead of having to debug it. cgitb.enable(format='text').
- cb321 1y agoWell, then you might like Nim for writing small CLI utilities. It just defaults to a console-friendly traceback on uncaught exceptions. cligen makes pretty nice CLIs pretty easy. (If you set up a $HOME/.cligen then you can get a shared colorized help / customization for any such utility, for example. So, set & forget kinda thing, maybe even making useful programs in as few as 3..7 lines of code, really.) It's not an experience without rough edges (though I'm not sure what is such an experience). So, probably depends on your priorities.