[Following up on cmucl-help]

Pat Monardo writes:
 > One thing I notice about working with structures is that there are a ton of
 > SETFs. I am not comfortable using SETFs with multiple locations, ie
 > (setf x 1 y 2)
 > It seems like a maintenance hassle down the road.
 > But sometimes the set's are related and it is enticing to use the multiple
 > location form.
 > Comments?

I think your discomfort is misplaced.  I think it's good style, and an
easy form of simple documentation, to group multiple setting forms
into a single SETF.  I (almost) always put line breaks between the
pairs, the lack of which might be the source of your discomfort:

  (setf x 1
        y 2
        z (1+ z))

As in the above form, I'll even shirk INCF or PUSH in order to put all
the related settings into one SETF form, precisely because it
documents to me later that they're related.

Do you think the above would be more of a maintenance hassle than
this?

  (setf x 1)
  (setf y 2)
  (incf z)

-- 
           /|_     .-----------------------.                        
         ,'  .\  / | No to Imperialist war |                        
     ,--'    _,'   | Wage class war!       |                        
    /       /      `-----------------------'                        
   (   -.  |                               
   |     ) |                               
  (`-.  '--.)                              
   `. )----'                               

Reply via email to