Re:REBOL Oneliners
by abrax3141 on Sunday March 08, 2020 @04:29PM
(#22520388)
The idea of a one-liner is sort of silly when applied to functional programming. Every lisp expression, for example, no matter how long in editor space, is logically a single line.
[ Parent
| on HN ]
It's only silly if you don't apply a reasonable character limit in your definition.
I would say < 80 is definitely a one-liner, < 100 is more-or-less a one-liner, < 120 is really pushing it. After that, you're cheating. Even Java style guides cut you off after 120.
12 of these "one-liners" fail even the most permissive of these criteria, but, y'know, YMMV. None are over 140.
> None are over 140.
Their limit is at the top of the page:
> 2. How long is a line? Here, we limited users to 132 chars. It's the old line printer standard.
To me all (complex) one liners are bad : they're hard to read and they don't manage errors.
I'd rather go through 5 lines of simple statements than try to decipher a "clever" one liner.
From the fine article : > Open a GUI, read web page, sent it as email
You really want to do that in one line ?
sending someone a link via email is a relatively common task.
why would it be undesirable to write short code that can do that?