# Yul

The entire content of this textbook can be summarized by the following word: Solidity.

Okay, maybe that's not the case. After all, we spent an entire chapter learning about the mechanics of the EVM. Learning about the EVM helped us understand how our code is actually compiled/run and gave us the foundation to write code that is both more secure and more efficient. However, one can argue that this still catered towards the overarching theme that is Solidity.&#x20;

In this chapter, we will diverge from learning strictly about Solidity and begin exploring **Yul**, a "middle-level" programming language that allows us to write code that is "closer" to the EVM when compared to Solidity. Yul is written within Solidity and offers reductions in gas usage when written correctly. However, as it will become apparent in the later parts of this chapter, Yul opens the door for advanced smart contract functionality and phenomena that will make you question your understanding of EVM-compatible blockchains (in a good way, of course).


---

# 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://cs4998.cornellblockchain.org/yul-and-advanced-evm-topics/yul.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.
