5 ms·
You took the examples where the number of parentheses is the same. Here is a more honest example: if (a && !b) {expr} => (if (and (a) (not b)) (expr)) Tha
by thiht 10y ago
You took the examples where the number of parentheses is the same. Here is a more honest example:
if (a && !b) {expr} => (if (and (a) (not b)) (expr))
That's a simple expression and I'm not even sure I managed to match the () correctly
- escherize 10y agoI agree it's hard to write lisp without a proper editor. Having seen the light I just can't go back now. The power, ease, and simplicity are not something I've experienced with non lisps.
- jordigh 10y agoI don't know much about Lisp, but at ILC 2014 [1] there were about 40 participants. In a show of hands, absolutely all of them used Emacs to write their Lisp. I've never seen Emacs unanimity anywhere else. -- http://ilc2014.iro.umontreal.ca/ http://ilc2014.iro.umontreal.ca/
- escherize 10y agoIncedentally I also use Emacs for editing lisp. (emacs lisp and Clojure.) Learning the hotkeys/concepts behind structural editing of lisp code was life changing metamorphasis, but quite difficult overall. There's been some fantastic work done by the Parinfer [1] team to bring the awesomeness of structural editing of lisp to the masses. The basic idea is that your parenthesis should infer where they belong by way of your indentation. I installed Parinfer it on my project: CLJSFiddle[2], and it's not what I'm used to and doesn't have everything but for a novice it is highly usable - check it out! [1] https://shaunlebron.github.io/parinfer/ https://shaunlebron.github.io/parinfer/ [2] http://cljsfiddle.com http://cljsfiddle.com
- junke 10y agoDon't put parenthesis around "a", this is a function call. (when (and a (not b)) expr ... expr)
- kiiski 10y agoYour 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 ago