Page:
							Interface Definitions
						
						
					
					
							Pages
							
							
								Arguments
							
								Blind Type Definitions
							
								Body
							
								Control Flow
							
								Data
							
								Enum Type Definitions
							
								File Structure
							
								Functions and Methods
							
								General Syntax
							
								Guidelines
							
								Home
							
								Identifiers
							
								Initialization
							
								Interface Definitions
							
								Metadata
							
								Modules
							
								Object Type Definitions
							
								Permissions
							
								Phrases
							
								Return Direction
							
								Tokens
							
								Variable Definition and Type Notation
							
						
					 Clone
	
					2 
					
				
						Interface Definitions
						
				
							
							Sasha Koshka edited this page 2022-08-24 16:32:21 +00:00 
						
					Syntax
face ro ReadWriter:Face
	write
		> data:{Byte ..}
		< wrote:Int
		< err:Error
	read
		> into:{Byte ..}
		< read:Int
		< err:Error
Interface sections contain a list of behaviors. Behaviors are a name followed by an indented block of inputs and outputs. It is essentially a more stripped down version of function syntax.
Semantics
Interfaces in ARF are like interfaces in Go, that is to say, their methods are defined and any object that has at least those methods can fulfill that interface.
Interfaces are able to inherit other interfaces using type notation. If an interface inherits nothing, it must inherit Face, which is a blank interface.