# Domain-Specific Languages (DSLs)

### Understanding eDSLs

Embedded Domain-Specific Languages (eDSLs) are specialized programming tools that enhance blockchain and smart contract development. These tools operate within existing programming languages, providing developers with a more intuitive and efficient way to write code.

> 💡 **Key Benefit**\
> EDSLs allow developers to write smart contracts at a higher level of abstraction, making code more readable, maintainable, and less prone to errors.

#### Why Use eDSLs?

EDSLs offer several advantages for blockchain development:

* More expressive and intuitive code writing
* Built-in error checking mechanisms
* Enhanced debugging capabilities
* Specialized testing frameworks
* Domain-specific optimizations

For example, rather than using pure Rust for Wasm smart contracts, developers can use specialized Rust eDSLs designed specifically for blockchain development, making the code more natural and easier to maintain.

### Available eDSLs

#### ink!

> ℹ️ **What is ink!?**\
> ink! is a Rust-based eDSL developed by Parity Technologies, specifically designed for Substrate's `pallet-contracts`.

**Key Features**

* Rust procedural macros support
* Comprehensive crate ecosystem
* Reduced boilerplate code
* Direct integration with `pallet-contracts` API

**Resources**

* [Official Documentation](https://ink.substrate.io/why-rust-for-smart-contracts)
* [GitHub Repository](https://github.com/paritytech/ink)
* [API Reference](https://docs.rs/pallet-contracts/latest/pallet_contracts/api_doc/trait.Current.html)

#### ask!

> 🚧 **Development Status**\
> ask! is a Polkadot treasury funded project currently under active development.

**Overview**

* Framework for AssemblyScript developers
* TypeScript-like syntax
* Targets `pallet-contracts` for Wasm smart contracts

**Resources**

* [GitHub Repository](https://github.com/ask-lang/ask)
* [Treasury Proposal](https://polkadot.polkassembly.io/post/949)

### Choosing the Right eDSL

When selecting an eDSL for your project, consider:

1. **Programming Language Familiarity**
   * ink! for Rust developers
   * ask! for TypeScript/AssemblyScript developers
2. **Project Requirements**
   * Smart contract complexity
   * Performance needs
   * Team expertise
3. **Development Status**
   * ink! is production-ready
   * ask! is under development

> 📚 **Learn More**\
> For detailed information about using these eDSLs, refer to their respective documentation and GitHub repositories.


---

# 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://docs.uomi.ai/build/wasm-smart-contracts/domain-specific-languages-dsls.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.
