Trailblazing Braille Taser ( @0x0@lemmy.dbzer0.com ) 124•1 year agoI propose a new, more threatening kind of control flow.
do { /* something */ } or else { /* you don't want to find out */ }
Strawberry ( @Strawberry@lemmy.blahaj.zone ) 28•1 year agothis is just a menacing try/catch!
moody ( @moody@lemmings.world ) 13•1 year agoIt_would_be_a_shame_if(condition)
Mesa ( @Mesa@programming.dev ) 5•1 year agoThe better try-catch. More intuitive if you ask me.
jadelord ( @jadelord@discuss.tchncs.de ) 5•1 year agoIt exists, kind of. Python has this construct
for item in iterable: ... else: ...
which always puzzles me, since it depends on a break statement execution. I always have to look it up when the else block is executed.
OpenStars ( @OpenStars@startrek.website ) English5•1 year agoYou just made me a offer I can’t refuse. I go now to sleep with the fishes…
rothaine ( @rothaine@beehaw.org ) English4•1 year agodo { /* something */ } do hast { /* something */ }
Trailblazing Braille Taser ( @0x0@lemmy.dbzer0.com ) 6•1 year agodo { /* something */ } do hast { /* something */ } do hast mich { /* something */ }
OpenStars ( @OpenStars@startrek.website ) English65•1 year agoPlease God let this be a humorous post that somehow does not also find a way to manage to come true…
jtk ( @jtk@lemmy.sdf.org ) English49•1 year agoI would have bought it if they said ifnot instead, it’s the same number of characters and wouldn’t require a major parser overhaul to support keywords with a ’ in the name.
Pup Biru ( @pupbiru@aussie.zone ) 26•1 year agoi mean, “unless” tends to be the usual term for an “if not” keyword in languages that implement such a thing
Fal ( @Fal@yiffit.net ) English15•1 year agoWhich is awful and incredibly confusing. I hate ruby
msage ( @msage@programming.dev ) 3•1 year agoAnd Perl
NigelFrobisher ( @NigelFrobisher@aussie.zone ) 3•1 year agoAnd my axe!
Pup Biru ( @pupbiru@aussie.zone ) 3•1 year agototally agree; just saying that if it’s GOT to be something, that something should probably be unless… unless . . .
frezik ( @frezik@midwest.social ) 2•1 year agoI find that you need to choose carefully when to use it. Simple cases tend to be alright. Larger, more complex conditions shouldn’t touch it.
OpenStars ( @OpenStars@startrek.website ) English12•1 year agoYeah, to be clear, I don’t like it, I don’t like it one bit:-P.
MagicShel ( @MagicShel@programming.dev ) 48•1 year agoReduce exclamation marks!? Great Scott!!! Is there a shortage of punctuation in the future!?
KairuByte ( @KairuByte@lemmy.dbzer0.com ) 13•1 year agoYou could have saved two, all you had to do was use the interrobang. You’re a monster.
SubArcticTundra ( @SubArcticTundra@lemmy.ml ) 9•1 year agoAll known deposits were depleted
janabuggs ( @janabuggs@beehaw.org ) 30•1 year agoI’m struggling to understand if this is true or ifn’t true
taanegl ( @taanegl@beehaw.org ) 24•1 year agoI’m just hoping this paves the way to code with Southern dialect
iffun is == true iffun ain't == false
timetravel ( @timetravel@lemmings.world ) 21•1 year agoMay I introduce you to the joys of #define and creating your own horrible sub language
frezik ( @frezik@midwest.social ) 6•1 year agoThat reminds me of an old paper about how to create a compilable C program out of old game ROMs. Decompile to assembly. Implement a bunch of
#define
statements that implement all the ASM statements. Now compile it to a native binary on whatever platform.Won’t likely be faster or more accurate than regular emulation methods, but it’s a neat idea considering that the source code on all this stuff was lost a long time ago.
xia ( @xia@lemmy.sdf.org ) English20•1 year ago“Help’s with readability”? You know what else helps? Not using contractions and introducing an unbalanced single quote.
- bdonvr ( @bdonvr@thelemmy.club ) 25•1 year ago
If they’d’nt’ve done that, it’d’ve been better. Agreed.
Cwilliams ( @Cwilliams@beehaw.org ) 3•1 year agoAside: rip Tom Scott
survivalmachine ( @survivalmachine@beehaw.org ) 3•1 year agoThis feels racist against Appalachia. We naturally speak with contractions and are commonly referred to as “unbalanced”.
frezik ( @frezik@midwest.social ) 3•1 year agoRuns havoc on parsing, too. It’s bad for both humans and robots. I say we ship it.
rimjob_rainer ( @rimjob_rainer@discuss.tchncs.de ) 20•1 year agoWhy not just ifnot? Same count of characters but an o instead of a possibly problematic single quote.
Ferk ( @Ferk@kbin.social ) 12•1 year agoYes… how is “reducing exclamation marks” a good thing when you do it by adding a
'
(not to be confused with,
´,
‘or
’` …which are all different characters).Does this rely on the assumption that everyone uses a US QWERTY keyboard where
!
happens to be slightly more inconvenient than typing'
?
jtk ( @jtk@lemmy.sdf.org ) English11•1 year agoifn't (myNum don't= 3 && myStr ain'tnull'rblankish)
SubArcticTundra ( @SubArcticTundra@lemmy.ml ) 5•1 year agoI hate seeing colloquial terms like ‘ain’t’ in non-comment (ie. standardized) parts of code
vlad ( @vlad76@lemmy.sdf.org ) 9•1 year agoWhat’s wrong with “else”
NekkoDroid ( @NekkoDroid@programming.dev ) 30•1 year agoIt’s not
ifn't
Darkassassin07 ( @Darkassassin07@lemmy.ca ) English3•1 year agoif(condition) {#block never used} else {#actually do a thing}
Vs
ifn't(condition) {#actually do a thing}
Vs
if!(condition) {#actually do a thing}
gandalf_der_12te ( @gandalf_der_12te@feddit.de ) 2•1 year agovs
if (not condition) {#actually do a thing}
MNByChoice ( @MNByChoice@midwest.social ) 2•1 year agoCannot start a statement with else. One can with ifn’t. There is a new thing where we don’t branch (which is a separate discussion).
Or am I missing the joke…
tiredofsametab ( @tiredofsametab@kbin.social ) 7•1 year agodie unless $keyword == “unless”;
fl42v ( @fl42v@lemmy.ml ) 6•1 year agoThis has to be illegal. I mean, it’s basically suicide incitement (or whatever is the phrase for it)
luciole (he/him) ( @luciole@beehaw.org ) 4•1 year agoI shan’t!
max ( @max@lemmy.blahaj.zone ) 2•1 year ago;-;
lordmauve ( @lordmauve@programming.dev ) 2•1 year agoPython already has this.