News for hackers. Stuff that matters.
Re:Interrobang by hurpaDurpa on Tuesday July 10, 2018 @10:30PM (#17504007)
This would really make for a great exception operator, for one-liner exception handling.

  (alert(null) ‽ console.log(error));
Better than:

  (x === null ? console.log(error) : alert(x));
EDIT: hey downvotes, let's play funny/not funny.
Re:Interrobang by justinator on Wednesday July 11, 2018 @02:45AM (#17504920)
Do you really want to give Larry Wall any more ideas‽
Re:Interrobang by snarfy on Tuesday July 10, 2018 @10:33PM (#17504021)
I can't seem to find the ‽ key on my keyboard.
Re:Interrobang by ars on Wednesday July 11, 2018 @12:41AM (#17504512)
APL would like to have a word: https://en.wikipedia.org/wiki/APL_(codepage)
Re:Interrobang by Symbiote on Wednesday July 11, 2018 @02:19AM (#17504818)
On Linux with the Compose key enabled, it's Compose, !, ?.

https://en.wikipedia.org/wiki/Compose_key

Re:Interrobang by hurpaDurpa on Tuesday July 10, 2018 @10:41PM (#17504062)
Well, obviously, the compiler could also interpret the consecutive use of each of the two distinct characters question mark (?) and exclamation point (!). But it would have to tolerate both options to remain convenient (?! and !? have the same effect).

Meanwhile the interrobang (‽) would really be an Easter egg.

Re:Interrobang by simcop2387 on Tuesday July 10, 2018 @11:17PM (#17504214)
most languages wouldn't work properly with ?! as that could be already valid (unary ! operator meaning not, and ? being used for the ternay operator). So you can't distinguish between: foo ?!bar : baz and an interrobang like operator. !? on the otherhand is likely to already be invalid and be parseable as an interrobang since it wouldn't already be valid to have a ? immediately following a ! in many languages. Having both work might be nice, but is likely impracticle for backwards compatibility.
Re:Interrobang by taneq on Tuesday July 10, 2018 @11:34PM (#17504287)
You can't‽ But it's right there‽
Re:Interrobang by empath75 on Tuesday July 10, 2018 @11:09PM (#17504185)
With ligatures you can just use ?! and make it look that way.
Re:Interrobang by opnitro on Tuesday July 10, 2018 @11:27PM (#17504262)
Racket doesn't seem to mind using λ despite it not being on the keyboard. I find it more convenient to remember a hotkey than to type `lambda`
Re:Interrobang by Jarred on Tuesday July 10, 2018 @10:57PM (#17504135)
alternatively:

  // Would run console.error with the Error object
  (alert(x) ?: console.error);
Re:Interrobang by azernik on Wednesday July 11, 2018 @06:47AM (#17505883)
You may know this, but others may not: this is an actual thing, and is called the Elvis Operator (think the hair). https://en.wikipedia.org/wiki/Elvis_operator

Shockingly, this is actually accepted by GCC's C dialect! And PHP! By the simple implementation expedient of making the second operand of the ternary operator optional.

Re:Interrobang by lifthrasiir on Wednesday July 11, 2018 @05:00AM (#17505466)
This is indeed a form supported by GNU C extension [1] (but `?:` is not a single token, so `? :` is permitted).

[1] https://gcc.gnu.org/onlinedocs/gcc/Conditionals.html#Conditi...