Library Design: Naming Conventions
    
    
    Part 1: Creation
    
    Published on 2018-06-19. Last updated on 2025-07-10
    
  
    
      | Function Name | Code Example | Explanation | 
  
  
    
      | – | List(1, 2, 3)
Array(12.3, 45.6)
Set("a", "b", "c") | 
          primary way of constructionresulting instance contains provided arguments verbatim | 
    
      | of(val1, ...) | Person.of(name, age) | 
          secondary way of constructionresulting instance contains provided arguments verbatimresult type might use OptionorResulttypes to encode failures | 
    
      | from(val) | Person.from(personEntity)
Person.from(family) | 
          tertiary way of constructionarguments are extracted, adapted, and/or convertedthe value of the instance is derived from the provided argumentsresult type is likely to use OptionorResulttypes to encode failures | 
    
      | parse(string) | Person.parse(string)
Int64.parse(string) | 
          quaternary way of constructionargument is parsed from a less structured representation, such as stringsresult type is highly likely to use OptionorResulttypes to encode failures | 
  
Modification
  
    
      | Function Name | Code Example | Explanation | 
  
  
    
      | with(val) | person.withAge(23)
person.with(age = 23) | 
          returns a copy of a value with parts replaced by the provided argument |