Cover photo

Introduction to Fe

Fundamentals of the Fe language: Structure and unique features for development on EVM

Important

  • The language is very recent, so there may be discrepancies after the publication of this post.

  • IT IS NOT READY FOR PRODUCTION: There are still certain bugs and limitations within; unless the team behind Fe notifies otherwise, I recommend using it locally or on testnet.

What is Fe

If we describe the language in a more technical way, we would say that it is a static language for EVM with a syntax similar to Rust; what this means is that Fe checks data types (such as integers, strings, booleans) during compilation, before executing the program, ensuring better early error detection. Along with the rust-like syntax, it allows us to have better expressiveness and security. create smart contracts. The programming language has been developed by the Argot Collective, the same team responsible for projects like Solidity, Sourcify, among others, which ensures total compatibility of the language with EVM.

If you have used or understand a bit of the syntax (writing) in Solidity, you will notice an extreme difference in how functions and variables are declared and in its overall structure. Here are some of the most important ones:

  1. Everything is immutable by default:
    Every variable, storage field, and parameter is immutable by default, which means that once declared, it cannot be rewritten. For it to be mutable (to be writable), it is necessary to declare it before the declaration.

  2. It has an effects system:
    That is, each handler or function must declare which contract resources it can read or modify, there are no hidden effects.

  3. Message-passing system:
    Contracts do not expose functions directly. They define a message queue (msg) and process them thru handlers (recv). This faithfully reflects how the EVM executes transactions.

  4. Projects like ingots:
    In Fe, your project is called an ingot, something similar to an app that contains several smart contracts. That is to say, like a crate in Rust or a package in npm, the ingot is the project unit, capable of containing multiple contracts, common functions, and dependencies. This allows for better logical organization, encapsulation, and code reusability.

  5. Complete toolchain included:
    Fe comes fully equipped with no external dependencies: package manager (ingots), code formatter (fe fmt), language server for IDEs, documentation generator (fe doc), and testing with integrated EVM simulation (fe test).

  6. Designed for EVM, not adapted:
    Unlike languages that added blockchain support as an extra layer, Fe was built specifically for the Ethereum Virtual Machine. It natively understands types like address and u256, generates efficient bytecode, and maintains ABI compatibility with existing tools and contracts.

  7. Pattern matching:
    Flow control that breaks down data and checks all possible cases. Similar to a smart switch that the compiler checks exhaustively — you can't forget to handle a variant..

    The goal of Fe is to prevent bugs before they reach production, offering strong guaranties about what the code can and cannot do once compiled.