(d) The use of property for the drainage of swamp or agricultural lands is declared to be a public use, and general laws may be passed permitting the owners or occupants of swamp or agricultural lands to construct and maintain for the drainage thereof, necessary drains, ditches and dykes upon the lands of others, under proper restrictions, on making just compensation, and such compensation together with the cost of such drainage may be assessed, wholly or partly, against any property benefited thereby; but no special laws shall be enacted for such purposes.