I think you can write your own modules for Reaktor 5 now, but Max definitely lets you write your own libraries and comes with full documentation and stuff for it.