URLs and HTTP is a standard. This allows us to generically use it, without knowing anything about its implementation. Create some query parameters, or a JSON payload, pass it to the URL using the correct verb, and voila! You’ve integrated two different systems.
This is actually the very definition of perfect encapsulation. So why don’t modern programming languages learn something from this? Why not create a generic tree structure, allowing us to generically pass data into our methods, and reference our methods as URLs?
Actually, the above perfectly describes Hyperlambda. Hyperlambda is the equivalent of an in-process URL method routing system, with the ability to pass in generic arguments, completely decoupling your components – Resulting in perfect encapsulation.
No references between the method invocation and its implementation. No strongly types adding to your dependency graphs. Nothing! The method invocation and its implementation knows no more about each other than an HTTP endpoint, and its consumer. And of course, since everything is in-process, execution of your method is as fast as using your IoC container to resolve a type. It doesn’t take a rocket scientist to realise this is a good thing!