in reply to Re^3: Can someone please write a *working* JSON module
in thread Can someone please write a *working* JSON module
I agree, your 1st snippet is bad form. And also the 3rd snippet looks better than the 2nd but the handle_overall_error() must include (for me) the logic of 2nd snippet in order to deduce what really happened, in which step the error really is. In theory it looks nice and compact. In practice, grouping step_1, 2 3 and 4 like this just happens in toy-cases and if they are grouped naturally like this then why not grouping them in a sub. Anyway. I get the point and thanks for the demonstration.
By the way, why do you dislike eval? I mean, I don't like eval EXPR either, but what's wrong with eval BLOCK?yes I was talking about eval BLOCK as well. Micro-optimisation mostly (mea culpa), I think it spawns a new interpreter right? I am this kind of person that I hate taking the car to the corner shop because I visualise horror: the engine metals screaching, burning, rubbing together, aching and suffering just because I am in need of a cigarette. So I invariably walked until I gave it up altogether.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Can someone please write a *working* JSON module
by dave_the_m (Monsignor) on Oct 27, 2021 at 10:47 UTC | |
by bliako (Abbot) on Oct 27, 2021 at 16:17 UTC | |
|
Re^5: Can someone please write a *working* JSON module
by Anonymous Monk on Oct 27, 2021 at 06:17 UTC | |
by bliako (Abbot) on Oct 27, 2021 at 07:58 UTC |