Technically, yes, but 99% of EEs would not approve of code in some weird new DSL as documentation for a circuit. While it may contain the same information as a drawn schematic, it is much more inscrutable and introduces mental overhead when you actually need to read it.
There's also a huge difference between a poorly laid out schematic and an excellent one; the latter makes it easier to follow the flow of signals and power through relevant parts of the circuit and allows you to easily pick out the different parts/modules and how they play their part in the circuit as a whole, all with a quick glance at a drawing.
I guess a (poor) software analogy would be that you could surely implement a function as a bunch of GOTOs and/or BRANCH commands, but just making a nested for loop would make the logic much clearer.