Release Notes
❱
Cangjie Release Notes
Development Guide
❱
Getting Started with Cangjie
❱
Getting Started with Cangjie
Installing the Cangjie Toolchain
Running the First Cangjie Program
Basic Concepts
❱
Identifiers
Program Structure
Expressions
Functions
Basic Data Types
❱
Basic Operators
Integer
Floating Point
Boolean
Character
String
Tuple
Array
Range
Unit
Nothing
Functions
❱
Function Definition
Function Call
Function Type
Nested Function
Lambda Expression
Closure
Syntactic Sugar in a Function Call
Function Overloading
Operator Overloading
const Function and Constant Evaluation
Structure Types
❱
Defining a struct Type
Creating a struct Instance
mut Function
Enum and Pattern Match
❱
Enum
Option Type
Pattern Overview
Refutability of Patterns
match Expression
Other Places to Use Patterns
Classes and Interfaces
❱
Classes
Interfaces
Properties
Subtype Relationships
Type Conversions
Generics
❱
Generic Overview
Generic Functions
Generic Interfaces
Generic Classes
Generic Structs
Generic Enums
Subtype Relationship of a Generic Type
Type Alias
Generic Constraints
Extensions
❱
Extension Overview
Direct Extensions
Interface Extensions
Access Rules
Collection Types
❱
Basic Collection Type Overview
ArrayList
HashSet
HashMap
Iterable and Collections
Packages
❱
Package Overview
Package Declaration
Visibility of Top-Level Declarations
Package Import
Program Entry
Exceptions
❱
Defining Exceptions
Throwing and Handling Exceptions
Common Runtime Exceptions
Using Options
Concurrent Programming
❱
Concurrency Overview
Creating a Thread
Accessing a Thread
Terminating a Thread
Synchronization Mechanism
Thread Sleep Duration
Basic I/O Operations
❱
I/O Stream Overview
I/O Node Streams
I/O Processing Streams
Network Programming
❱
Network Programming Overview
Socket Programming
HTTP Programming
WebSocket Programming
Macro
❱
Macro Overview
Token Types and quote Expressions
Syntax Nodes
Macro Implementation
Compiling, Error Reporting, and Debugging
Defining and Importing Macro Packages
Built-in Compilation Flags
Practical Cases
Reflections and Annotations
❱
Dynamic Features
Annotations
Cross-Language Interoperability
❱
Cangjie-C Interoperability
Compilation and Building
❱
cjc Usage
Introduction to cjpm
Conditional Compilation
Deployment and Operation
❱
Deploying the Cangjie Runtime
Running Cangjie Executable Programs
Appendix
❱
cjc Compilation Options
Installation and Support of Toolchain on Linux
Runtime Environment Variable User Guide
Keywords
Operators
Operator Functions
TokenKind Type
API Reference
❱
Cangjie Standard Library API Reference
std.core
❱
Functions
Types
Built-in Types
Interfaces
Classes
Enums
Structs
Exceptions/Errors
Samples
❱
Cangjie Concurrent Programming Example
Example of Interaction Between CString and C Language Code
std.argopt
❱
Functions
Classes
Enums
Structs
Exceptions/Errors
Samples
❱
Parsing Command Line Parameters
Parsing Long Command Line Parameters (deprecated)
Parsing Short Command Line Parameters (deprecated)
std.ast
❱
Functions
Interfaces
Classes
Enums
Structs
Exceptions/Errors
Samples
❱
Macro With Context
Syntax Tree Node Print
AST Object Operation Example
Example of Parsing Cangjie Source Code into an AST Object
User-defined Error Reporting API
Example of Traversing AST Objects Using a User-defined Access Function
std.binary
❱
Interfaces
std.collection
❱
Functions
Interfaces
Classes
Exceptions/Errors
Samples
❱
Add Functions of ArrayList
Get and Set Functions of ArrayList
Remove, Clear, and Slice Functions of ArrayList
Get, Add, and Contains Functions of HashMap
Add, Remove, and Clear Functions of HashMap
Add, Iterator, and Remove Functions of HashSet
Add, Iterator, and Remove Functions of TreeSet
Iterator Operation Function
std.collection.concurrent
❱
Types
Interfaces
Classes
Samples
❱
ConcurrentHashMap Usage Example
ConcurrentLinkedQueue Usage Example
std.console
❱
Classes
Samples
❱
Console Example
std.convert
❱
Interfaces
Samples
❱
covert Usage Example
std.crypto.cipher
❱
Interfaces
std.crypto.digest
❱
Functions
Interfaces
std.database.sql
❱
Interfaces
Classes
Enums
Exceptions/Errors
Samples
❱
Example of Obtaining Database Connection
Example of Deleting and Creating a Table
Example of Executing Database Operation Statements
Example of Executing Transaction Control Statements
std.deriving
❱
Macros
Samples
❱
Deriving Example
std.env
❱
Functions
Classes
Exceptions/Errors
Samples
❱
env Example
std.fs
❱
Functions
Classes
Enums
Structs
Exceptions/Errors
Samples
❱
Directory Example
File Example
FileInfo Example
Path Example
std.io
❱
Functions
Interfaces
Classes
Enums
Exceptions/Errors
Samples
❱
BufferedInputStream Example
BufferedOutputStream Example
ByteBuffer Example
ChainedInputStream Example
MultiOutputStream Example
StringReader Example
StringWriter Example
std.math
❱
Interfaces
Functions
Enums
Samples
❱
Example of Basic Mathematical Operations
std.math.numeric
❱
Functions
Enums
Structs
Samples
❱
Example of Basic Mathematical Operations of BigInt
Example of Basic Attributes of BigInt
Example of Size Comparison of BigInt
Example of Basic Mathematical Operations of Decimal
Example of Basic Attributes of Decimal
Example of Size Comparison of Decimal
std.net
❱
Interfaces
Classes
Enums
Structs
Exceptions/Errors
Samples
❱
Attribute Configuration Usage Example
TCP Usage Example
UDP Usage Example
UNIX Usage Example
UnixDatagram Usage Example
std.objectpool
❱
Classes
std.overflow
❱
Interfaces
Exceptions/Errors
Samples
❱
Example of the Returning Option Policy
Example of the Saturating Policy
Example of the Throwing Exception Policy
Example of the Most Significant Bit Truncation Policy
std.posix
❱
Variables and Constants
Functions
Samples
❱
File Content Operations
File Information Operations
Obtaining System Information
Information Operations Related to Processes
std.process
❱
Functions
Classes
Enums
Exceptions/Errors
Samples
❱
Operations Related to Any Process
Operations Related to Subprocesses
std.random
❱
Classes
std.ref
❱
Classes
Enums
Samples
❱
WeakRef for Cache
std.reflect
❱
Functions
Types
Classes
Enums
Exceptions/Errors
Samples
❱
Usage of Annotation
Usage of Dynamic Loading
Usage of Member Information
Usage of TypeInfo
std.regex
❱
Classes
Enums
Structs
Exceptions/Errors
Samples
❱
Regex Example
std.runtime
❱
Functions
Structs
std.sort
❱
Functions
Interfaces
Samples
❱
Sorting Arrays
std.sync
❱
Variables and Constants
Interfaces
Classes
Enums
Structs
Exceptions/Errors
Samples
❱
Usage of Atomic, Monitor, and Timer
std.time
❱
Classes
Enums
Structs
Exceptions/Errors
Samples
❱
DateTime Comparison
Conversion Between DateTime and String
Obtaining the Date-Time Information
Local Time of a Time in Different Time Zones
Using MonoTime for Timing
std.unicode
❱
Interfaces
Enums
std.unittest
❱
Functions
Types
Interfaces
Classes
Enums
Structs
Exceptions/Errors
Samples
❱
Getting Started with Unittest
Basic Concepts and Usage of Unittest
Parameterized Test
Dynamic Test
Test Templates
Benchmark Tests
std.unittest.mock
❱
Functions
Interfaces
Classes
Enums
Exceptions/Errors
Samples
❱
Getting Started with the Mock Framework
Basic Concepts and Usage of Mock
Guide to Stubs
Verification API of Mock Framework
std.unittest.mock.mockmacro
❱
Macros
std.unittest.testmacro
❱
Macros
std.unittest.common
❱
Functions
Interfaces
Classes
Enums
std.unittest.diff
❱
Interfaces
std.unittest.prop_test
❱
Functions
Interfaces
Classes
Structs
Tools Guide
❱
IDE Plug-in User Guide
❱
Installation Guide
Language Service
Creating a Cangjie Project
Compilation and Building
Debug Service
Command Line Tools Integration
Command Line Tool Usage Guide
❱
Package Manager
Debugger
Static Check Tool
Formatting Tool
Coverage Statistics in Command Line Mode
Performance Analyzer
Exception Stack Restoration Tool
Light
Rust
Coal
Navy
Ayu
I/O Processing Streams