# Introduction

## What is Vortex?

Vortex is a dynamically typed interpreted programming language designed to explore links and relationships between entities through reactive programming.

{% code overflow="wrap" %}

```rust
var x = 0
var y = 0

/*
    Let's set a hook on 'x' so that when it changes, it updates 'y'
*/

x::onChange((e) => {
    println(f"x: ${e.old} -> ${e.current}")
    y = x * 2
})

x = 5

/* 
    Changing 'x' will print the below to the console:
        x: 0 -> 5
    And update the value of 'y'
*/

println(y) // 10
```

{% endcode %}

## Why use Vortex?

* **Simplicity:** It makes creating reactive programs easy
* **Extensibility:** It offers C interoperability and can interface with external libraries
* **Modularity:** Relative imports allows your code to be modular and well organised
* **Familiar syntax:** Easy to write and easy to read syntax

## What does Vortex offer?

* **Hooks:** Simple reactive programming
* **C Interoperability:** Extend the language to suit your needs
* **Coroutines:** Building blocks for async code
* **Standard library:** Useful modules to solve all kinds of programming problems

Learn more about the core functionality of the language by reading the language reference:

{% content-ref url="language-reference" %}
[language-reference](https://dibs.gitbook.io/vortex-docs/language-reference)
{% endcontent-ref %}

Or skip straight to the examples to see what you can do with Vortex:

{% content-ref url="examples" %}
[examples](https://dibs.gitbook.io/vortex-docs/examples)
{% endcontent-ref %}

Alternatively, if you just want to get started straight away, read the Getting Started guide to learn how to compile Vortex and run your first program:


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dibs.gitbook.io/vortex-docs/introduction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
