R inferno (rant) [Software]
Haha Hötzi,
❝ cat(x1, "at least", x2, "\n"))
I agree
Like you I'd much prefer the classical
I think this also goes to show that error messages should be user-friendly. If I am not mistaking only the guy who wrote the function understands that mumbo-jumbo. Preventive keelhauling would indeed seem to be a proper action to take.
❝ ifelse (x1 < x2,
❝ cat(x1, "at least", x2, "\n"))
❝
❝ 12 less than 13
❝ Error in ifelse(x1 < x2, cat(x1, "less than", x2, "\n"), cat(x1, "at least", :
❝ In addition: Warning message:
❝ In rep(yes, length.out = length(ans)) :
❝ What the f…k?
I agree
ifelse(a,b,c)
is a borderline silly function. It is in no way clear from the error message but b and c should be lean and mean variables rather than expressions. Therefore ifelse (a, do.this(blah), do.that(blah))
will only cause headache, at least as long as do.this/that(blah)
doesn't return a value. Like you I'd much prefer the classical
if else
construct. I think this also goes to show that error messages should be user-friendly. If I am not mistaking only the guy who wrote the function understands that mumbo-jumbo. Preventive keelhauling would indeed seem to be a proper action to take.
—
Pass or fail!
ElMaestro
Pass or fail!
ElMaestro
Complete thread:
- R inferno (rant) Helmut 2015-10-27 21:06 [Software]
- R inferno (rant)ElMaestro 2015-10-28 08:44
- Vectorized if d_labes 2015-10-28 09:42
- R inferno (without rant) d_labes 2015-10-28 09:18
- R inferno (rant)ElMaestro 2015-10-28 08:44