3 ms·
Don't know about Elixir, but Clojure has a strong focus on dealing with external system the following way: - convert the data output/need as input in core data
by dimitar 5y ago
Don't know about Elixir, but Clojure has a strong focus on dealing with external system the following way:
- convert the data output/need as input in core data structures
- Don't use classes or custom types to encapsulate data and make it accessible using a custom interface
- instead manipulate the data structures instead using the large standard library.
- convert the data back into the required format for storage/output/etc.
Very ETL-like, that is needed as different systems that need to be glued together may be written in different languages and most likely will export serialised data or write in a database. Certainly binary formats are rare nowadays.
Abstractions like the one for sequences allow reuse of the same function for different data structures (you don't have to convert things into lists for processing). It's possible to have other, non-core data structures implement the same abstractions, so that the existing library can be used.
ORMs are not desirable with that approach, for example. The query result tables are usually converted into things like Clojure hash-maps instead being created into unique objects with different ways of accessing the encapsulated data.
Then you have functional programming, which while nice by itself also allows using your cores efficiently. Less of a need for additional "infrastructure" glue that way. Asynchrony is also provided using libraries like core.async or agents.