JotLang 1.0.0

dotnet add package JotLang --version 1.0.0
                    
NuGet\Install-Package JotLang -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="JotLang" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="JotLang" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="JotLang" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add JotLang --version 1.0.0
                    
#r "nuget: JotLang, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package JotLang@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=JotLang&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=JotLang&version=1.0.0
                    
Install as a Cake Tool

Jot - Linguagem de Programação para Backend

Jot é uma linguagem de programação otimizada para desenvolvimento backend, focada em simplicidade e produtividade para APIs RESTful. Ela compila diretamente para código C# e .NET, mantendo toda a robustez e recursos do framework.

Características Principais

  • Sintaxe simplificada e intuitiva
  • Compilação direta para .NET
  • Otimizado para APIs RESTful
  • Suporte nativo a injeção de dependência
  • Logging integrado
  • Tratamento de erros padronizado
  • Cache nativo
  • Documentação automática de API
  • ORM simplificado
  • Middleware customizável

Sintaxe Básica

Estrutura

import System

module MeuApp

    class Program {
        fn Main() {
            print("Olá, mundo!")
        }
    }

Tipos e Variáveis

var x: int = 10
cst y: string = "texto"
var lista: list<string> = new list<string> { "a", "b" }
var dict: dict<string, int> = new dict<string, int>()

Funções

fn Soma(a: int, b: int) => int = a + b

fn Processar(lista: list<int>) {
    foreach item in lista {
        print(item)
    }
}

Classes e Propriedades

class Usuario {
    prop int Id
    prop string Nome
    prop string Email
}

APIs REST

@api
@route("api/usuarios")
class UsuarioController : ControllerBase {
    @httpget
    fn GetAll() => Ok(usuarios)

    @httppost
    fn Create(Usuario usuario) {
        // Lógica aqui
    }
}

Exemplos

Veja exemplos completos na pasta examples/:

  • TodoApi.jt - API REST básica com CRUD
  • AuthApi.jt - Autenticação e autorização
  • MiddlewareApi.jt - Middleware e tratamento de erros
  • CacheApi.jt - Cache e validação

Instalação

  1. Instale o .NET SDK 8.0 ou superior
  2. Clone este repositório
  3. Execute dotnet build para compilar o transpilador
  4. Use o transpilador para converter arquivos .jt em .cs

Uso

  1. Crie arquivos com extensão .jt
  2. Use a sintaxe Jot para escrever seu código
  3. Use o transpilador para gerar o código C#
  4. Compile e execute o código gerado

Contribuindo

Contribuições são bem-vindas! Por favor, leia as diretrizes de contribuição antes de enviar pull requests.

Licença

Este projeto está licenciado sob a licença MIT - veja o arquivo LICENSE para detalhes.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 188 4/13/2025