Liking cljdoc? Tell your friends :D

automaton-core.utils.date

Utility function for date management

Utility function for date management
raw docstring

automaton-core.utils.keyword

Utility functions for keywords.

Utility functions for keywords.
raw docstring

automaton-core.utils.pretty-print

Gathers functions related to pretty printing or pretty formatting.

Gathers functions related to pretty printing or pretty formatting.
raw docstring

automaton-core.utils.sequences

Manipulation of sequences

Manipulation of sequences
raw docstring

automaton-core.utils.string-to-id

Transform a string into an id That id are currently used and tested for React

Transform a string into an id
That id are currently used and tested for React
raw docstring

automaton-core.utils.type-arg

Force arguments to comply to a protocol

Design decision

  • Arguments typed can be asserted
    • Rationale:

      • By default functional programming does not require typing of arguments. But the assembly of many different components may lead to difficult debugging, as the failing will occur deep in the call stack. Without a good understanding of the implementation, the error's understanding may be difficult. So the solution is to assert the arguments type.
      • This is concept usually used in Object Oriented Programming, but Hephaistox believes OOP's principle are useful, the point is to apply it where we need it, and not everywhere as most of the OOP language requires.
      • We believe our components assembly solutions will need these assertion to robustify the code and accelerate the development cycle
    • Consequences:

      • the asserts functions below should be called by the implementations build function
      • if the argment is not compliant, it is explicitly refused and the build function returns nil
    • Limit

      • The assert is time consuming during optimization phase. So it is done only on development environment, through a macro mechanism which is skipping that assertion implementation
      • The this argument of a defrecord (i.e. the first argument) couldn't be tested in the implementation as clojure needs a valid object to be able to call the method on it.
      • As described below, this mechanism if implemented for clojure compiler only
    • Assert-protocol is not implemented on clojurescript

    • Rationale: The solution is based on extends? which is not compatible with clojurescript as for now (cf. clojurescript doc)

    • Consequence:

      • This tests will only be checked during clojure test, which is not an issue if that assemblies are done in cljc side
      • All assert will return true on clojurescript
      • The assert-protocol function has a :unused-binding flag to prevent kondo warnings
Force arguments to comply to a protocol

Design decision
* Arguments typed can be asserted
   * Rationale:
       * By default functional programming does not require typing of arguments. But the assembly of many different components may lead to difficult debugging, as the failing will occur deep in the call stack. Without a good understanding of the implementation, the error's understanding may be difficult. So the solution is to assert the arguments type.
       * This is concept usually used in Object Oriented Programming, but Hephaistox believes OOP's principle are useful, the point is to apply it where we need it, and not everywhere as most of the OOP language requires.
       * We believe our components assembly solutions will need these assertion to robustify the code and accelerate the development cycle
   * Consequences:
      * the asserts functions below should be called by the implementations build function
      * if the argment is not compliant, it is explicitly refused and the build function returns nil
   * Limit
      * The assert is time consuming during optimization phase. So it is done only on development environment, through a macro mechanism which is skipping that assertion implementation
      * The `this` argument of a `defrecord` (i.e. the first argument) couldn't be tested in the implementation as clojure needs a valid object to be able to call the method on it.
      * As described below, this mechanism if implemented for clojure compiler only

  * Assert-protocol is not implemented on clojurescript
   * Rationale: The solution is based on `extends?` which is not compatible with clojurescript as for now (cf. [clojurescript doc](https://clojurescript.org/about/differences#_protocol))
   * Consequence:
       * This tests will only be checked during clojure test, which is not an issue if that assemblies are done in cljc side
       * All assert will return true on clojurescript
       * The `assert-protocol` function has a `:unused-binding` flag to prevent kondo warnings
raw docstring

automaton-core.utils.uuid-gen

Generate uuid, is a proxy to http://danlentz.github.io/clj-uuid/

Generate uuid, is a proxy to `http://danlentz.github.io/clj-uuid/`
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close