Rather than building walls up, I find it's faster to just get everyone picks and just channel out a courtyard ringed with a moat.
That's actually a pretty good idea. I tend to make an unfilled moat around my outdoor 30x30 area, but the beasties kept scaring my dwarves. I'm in the process of building a wall around the entire area, but it's a low priority. I had my first flying siege yesterday, so I really appreciated that bridge in the hallway leading to my pasture. I have enough indoor grazing land and a refuse pit that it was mostly just an inconvenience.
Come to think of it, I'm not actually sure where my food and booze comes from. I have a bunch of fields and the boozebellies have really gotten out of hand with the breading. I occasionally slaughter a dozen of them. If I killed them all off, would the whole fort go dry and starve, or are they just add some flavor to all the crops I farm? I really have no idea. I have whiskey though. I have a ton of whiskey, and that is no accident.
I don't want to go to the extreme of walling off my fortress with bridges and wall grates, because it feels a little cheaty. Though lately it seems like this is the only way to survive as dwarves fall like wheat before a scythe and the resultant tantrum spirals destroy what's left of the fortress.
With the huge annoying waves of migrants attracting attention and eating all the food, is it even possible to get a strong enough military ready for sieges by the time they come? Later on, you might be able to dispose of your walls and traps, but I've found it almost impossible to deal with sieges head on in the first couple years. Maybe I just just don't play aggressively enough.
You could try a compromise though. Have a couple long entrance hallways gated off to split the siege into more manageable pieces for your military to handle. Later, when those sieges just put your troops to sleep, you can bring in the traps/magma and make it viewable from the dining room. Nothing like some goblin screams for background noise while you eat, right?
I'm actually starting to think that walls are to keep the refugee migrants out. Stopping sieges is actually just a side bonus. I might have to make a migrant incineration burrow to get rid of the milkers and such without keeping the useful ones away.