This is somewhat "comparing apples and oranges". Glayout was original created for photonics work, but since it generates valid GDS output, it has been used more generally for GDS generation. Klayout can work with glayout but it has its own routines for scripted GDS generation, as well. Magic is more like klayout; it is a full-featured layout editor, and since (like klayout) it operates in an interpreter environment (Tcl, as mentioned above), it can also generate GDS from interpreter scripts; however, magic has its own database format and so unlike glayout and klayout, it doesn't generate GDS directly, but the scripts generate geometry in the magic database, and then magic can export that to GDS. ALIGN was developed especially for general-purpose analog automatic placement and routing, which involves a lot more than just scripting; it is a very complicated set of optimization problems.