Arc Forumnew | comments | leaders | submitlogin
1 point by dfranke 6163 days ago | link | parent

What's wrong with

  (let d (+ a c)
     (if (> d b) (= a d)))

and if your concern is efficiency rather than readability, yell at your compiler guy to implement common subexpression elimination.


2 points by bOR_ 6163 days ago | link

simplicity. I want (and I think I've seen enough examples of code now to write a macro to do so).. I want to be able to say / think / write this:

  (if (calculation gives wanted result) (assign calculation to variable)).
saying / thinking / writing your version just puts the language in the way of what I want to write down.. and even though the difference is minimal, all these little kind of things can add up and obfuscate your code.

  (store calculation as variable
    (if (variable gives wanted result) (assign calculation to another variable))
General idea of the post was just to try and find bits and pieces where the language can be smoothened.

-----