Levi Larkey <[EMAIL PROTECTED]> wrote:

a perfect illustration of why allowing "=" as an alternative
spelling for "<-" was always an obviously really bad idea.

        Is there any reason for using one operator over the other outside of 
        function definitions and calls?

You should never use "=" for assignment unless you are suffering such
severe "C" withdrawal symptoms that the doctor just had to give you a
shot to calm you down.  It is best to keep different symbols for
different purposes.  (I note that Ada uses ":=" for assignment and
"=>" for keyword arguments.)

Something that would be quite useful would be an option asking R to
warn you
    - if you have any assignment operator in a function argument
      (thanks to lazy evaluation this probably *won't* do what you
      expect)
    - if you have "=" anywhere except for binding a name to an argument.
Perhaps these could be two options.

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to