I'd avoid cases where extending the language is done in a non-obvious and ambiguous way.
I'd avoid cases where extending the language is done in a non-obvious and ambiguous way.
…mumbles something about prying those from my cold dead hands.
Like if you have super long expressions in your ternaries, or you have a bunch of nested/chained ternaries it can be hard to parse, but in a lot of cases it's so nice to get something onto one line instead of needing an if/else
const foo = bar ? 1 : 2;
Without ternary you wouldn't be able to use const specifier on foo.
Note: These lines should be split, but many of them are not. How do I do that? I read formatdoc, but that did not help.
; # see where text starts; mut = ((substr($0, lf1-length(lf1str), length(lf1str)) != lf1str) \ ? 1 \ : ((substr($0, lf1, 1) == " " ) \ ? (lf1+1) \ : lf1) \ ); # start of string;
---------------------------
# return file and line number with optional text; function filineg(ffilename, ffilerec, fltext) { ; # first version always gives a line number, second does not for line 1; return (ffilename \ (ffilerec == "" ? "" : (":" ffilerec)) \ ((fltext == "") \ ? "" \ : (" in \"" fltext "\"") \ )); }
------------------------------------
outstr[2] = (head \
( (lnum > 1) \
? (substr(bigsep, 2, lnum-1) " ") \
: (substr(spaces, 1, lnum)) \
) \
(header2==""?" ":header2) null("output space if null - 5-20-98") \
substr(bigsep, 1, \
ltocout-lhead-lpn-1 \
-(lheader-lheadchop)-lnum \
-((null_loc > 0) \
? lnullstring \
: 0 \
) \
) " " pn); # parens make it line up;
----------------------function telldepth(deptxt, dep1, dep2) { ; # change depth from dep1 to dep2; ; # good luck figuring this out in a month!; ; # tell how depth changes; recnumprint("{" deptxt " " \ ((dep1=="") \ ? ((dep2=="") \ ? ("leaves depth as is") \ : ("sets depth " dep2)\ ) \ : ("changes depth " dep1 " to " dep2) \ ) " in " filine() "}"); }