Make dressing first so it's ready to toss on vegetables as soon as they are shredded.
In a small bowl, mix together the mayonnaise, vinegar, sugar, garlic, pepper and salt. Set aside.
In a large bowl, toss the carrots and cabbage.
Immediately pour dressing over cabbage mix and toss until all vegetables are well-coated. Cover bowl and refrigerate until vegetables wilt just a little, about 15 minutes. (The flavors blend even better if slaw marinates in refrigerator for about 1 hour.)
Toss again before serving to redistribute any dressing that has settled in the bottom of the bowl.