I'd like this too... and Minkowski intersection (i.e. a shell). Actually, it might be better if minkowski() was modified to not automatically union() the original object into the result. Perhaps by passing an optional parameter to it?

I think the following implements Minkowski difference (if I understand correctly what that is). Or are there subtleties I've missed?

// Minkowski difference??? of a given object with second given object, similar to the existing minkowski() function.
module minkowskiDifference() {
difference() {
children(0);
minkowski() {
children(0);
children(1);
}
}
}
// Shell of a given object with second given object, similar to the existing minkowski() function.
module minkowskiIntersection() {
intersection() {
minkowskiDifference() {
children(0);
children(1)
}
children(0);
}
}

Quotefrankvdh
I think the following implements Minkowski difference (if I understand correctly what that is). Or are there subtleties I've missed?

I had understood the Minkowski difference the other way round, i.e. not to subtract the original object from the Minkowski sum (which indeed is easy), but rather to subtract the second object from all points on the surface of the first object. So the result would not be a hollow object, but a smaller version of the first object from which the second object was "shaved away" on all sides.

Further to this discussion, I rethought about this problem - and I think that I found a solution...

My implementation uses the fact that the Minkowski sum acts as a difference when applied to a cavity inside a larger object.
So we need to construct an object which has a "hole" that corresponds to the original object and apply the Minkowski sum to make the hole smaller using the second object. Then the Minkowski difference is obtain by a (standard) difference subtracting the resulting hollow object from the initial object:

////////////////////////////////////////////////////////////////////
// Implementation of a Minkowski difference using
// the Minkowski sum on a negative ("hole") of the initial object
////////////////////////////////////////////////////////////////////
module minkdiff(){
// Subtract from the original object a bigger object with a Minkowski summed (->reduced) hole
difference(){
children(0);
// Minkowski sum of the negative initial object
minkowski(){
// make a hollow object with a hole that corresponds to the initial object
difference(){
// increase the size of initial object using Minkowski sum
minkowski(){
children(0);
cube([1,1,1],true);
}
// now remove initial object
children(0);
}
children(1);
}
}
}
// now try it out, to see if it works...
%cylinder(r=10,h=10);
%color("red",0.5)translate([-10,0,10])cube([10,1,1],true);
minkdiff(){
cylinder(r=10,h=10);
cube([10,1,1],true);
}

Here is the result of the above example: the Minkowski difference (green) of a cylinder (gray) with a cube (red).

I am not sure how robust this implementation is for really complex object - but so far, it's the best solution I could come up with...