Unlabels

From Esolang
Jump to navigation Jump to search

"Why sit around and think of a label?" is the tag line of Unlabels, the language that follows C syntax (almost) where you don't have to label a single object.

int (mut int ) {
  ++;
  return  ;
}
mut int  = 3;
 ( );

This language was designed to be easy for every C/C++/C# coder who has a hard time naming their variables.

Example

The following is an example of main.unlb:

celpack Celpack.clpk;
int  () {
  int mut  = 10;
  while ( < 20) {
    ++;
  }
  return ;
}
Celpack::
  IO::
     ("My variable  is now 20.");

(For reference, the CELPACK file [similar to package.json or Cargo.toml] looks like this:)

TYPE=Celpack,
Dependents="main.unlb",
Packages={
  import CelerySTD::IO::  as ' (,string)';
},
CelpackVersion=3.5.0;

And the CELERY file looks like this when main.unlb is compiled:

; CeleryVersion=6.0 token+,
; File: 'main.unlb',
; CelpackInfo: {
    ; UsesCelpack: True,
    ; FileName: 'Celpack.clpk',
    ; CelpackVersion: this.FileName.Tokens[CelpackVersion],
    ; Packages: {
        ; CelerySTD ^? IO ^? ' ' -> FunctionDef: ' (,string)'
    },
    ; Dependents: {
        ; 'main.unlb'
    },
    ; Type: CELPACK
},
; Code: {
    ; DependsOn: Celpack, -> this.parent.CelpackInfo,
    ; _function: {
        ; ReturnType: 'int',
        ; Label: '&null',
        ; @variable: {
            ; Type: 'int',
            ; IsMutable: True,
            ; Label: '&null',
            ; Value: 10
        },
        ; Loop: {
            ; Type: 'DoWhile',
            ; Condition: this.<.@variable.Value True:LessThan value: 20,
            ; UntilStopped: {
                this.<.@variable.Value Increment
            },
        },
        ; Return: this.<.@variable.Value
    },
    ; _function Celpack IO::' (,string)' -> (String "My variable  is now 20.")
}