4 ms·
Your example is also misleading. The `a` and `expr` are written as variables in the left example, but as function calls in the Lisp version. More correctly it w
by kiiski 10y ago
Your example is also misleading. The `a` and `expr` are written as variables in the left example, but as function calls in the Lisp version. More correctly it would be either
if (a && !b) { expr } => (if (and a (not b)) expr)
Or
if (a() && !b) { expr() } => (if (and (a) (not b)) (expr))
Now the amount of parentheses is either 4/6 or 8/10 which is not a very big difference (and caused only by the syntactic sugar for `not`), especially considering that the left example uses `!`, `&&` and two kinds of parentheses (perhaps a `;` as well).
- thiht 10y agoYou're absolutely right, I didn't know the difference between "a" and "(a)", sorry. My point was more about the two extra parentheses for each && or ||. Imagine converting if (a && b && c && d || e) to a LISP.
- hardworker7882 10y agoI am a visible Hacker. Give me a trial. Tell me what you want me to do. It can be in our darkest secrets. I just need you to be truthful. That is the First step to make me have a deal done. I am only here to blow your mind, and Bring a smile on you.. To me, everything is possible, Tell me what you want to know about your spouse, your friend and family member, , result upgrade, bogging , spouse spy, just name it, as I will solve it. as an ex FBI secrete spy for 11 YEARS... I can change anything accessible online. I can hack into their privacy and Give you adequate output on what you are dying to know or maneuver... My Contacts are : Email: hack702j002d77s@gmx.us Phone number: +14437633327 ( Text me First if you want me to pick your call ) Where you are in the world does not matter. I am not a racist as I am open to every clients around the world... WHAT DO YOU WANT ME TO HACK??? As a professional hacker for hire company, we provide the best certified hackers available combined with talent and the highest level of privacy and confidentiality to our clients. CALL ME GUARDIAN PROTECTION service includes Change University grades Facebook, twitter,Wassap, IG hack Email hack Wipe criminal records Wipe credit card debt MasterCard's/visa cards Bank account Data base hack and lot more hacking services in general
- hardworker7882 10y agoI am a visible Hacker. Give me a trial. Tell me what you want me to do. It can be in our darkest secrets. I just need you to be truthful. That is the First step to make me have a deal done. I am only here to blow your mind, and Bring a smile on you.. To me, everything is possible, Tell me what you want to know about your spouse, your friend and family member, , result upgrade, bogging , spouse spy, just name it, as I will solve it. as an ex FBI secrete spy for 11 YEARS... I can change anything accessible online. I can hack into their privacy and Give you adequate output on what you are dying to know or maneuver... My Contacts are : Email: hack702j002d77s@gmx.us Phone number: +14437633327 ( Text me First if you want me to pick your call ) Where you are in the world does not matter. I am not a racist as I am open to every clients around the world... WHAT DO YOU WANT ME TO HACK??? As a professional hacker for hire company, we provide the best certified hackers available combined with talent and the highest level of privacy and confidentiality to our clients. CALL ME GUARDIAN PROTECTION service includes Change University grades Facebook, twitter,Wassap, IG hack Email hack Wipe criminal records Wipe credit card debt MasterCard's/visa cards Bank account Data base hack and lot more hacking services in general
- likeclockwork 10y agoif (a && b && c && d || e) { doSomething(); } becomes (if (or (and a b c d) e) (doSomething)) It's just a little more explicit because operator associativity and precedence aren't worked out for you. (For better or for worse.) EDIT: I think you were imagining something like this: (if (or (and a (and b (and c (and d)))) e) (doSomething)) ..which is definitely not the art.
- kiiski 10y agoAdding to this, in a real situation those variables are probably not going to be nice single letter variables. With longer names the Lisp syntax with unambiguous structure/order of precedence becomes much nicer. (if (or (and foobar (some-predicate-p quux) (= qwerty 432)) (a-long-function-call-with-two-args bar ytr)) ...) Compared to something like: if (foobar && somePredicate(quux) && (qwerty == 432) || aLongFunctionCallWithTwoArgs(bar, ytr)) { ... }