Mani
1.0.0
Versão 1.3.0
Uma linguagem incrível e super simples!
Máni é uma linguagem interpretada simples de aprender e fácil de usar.
A idéia por trás disso é, pegue algumas das boas partes de outros idiomas, como NodeJs, C ++, Python etc., implemente -os nisso e tente construir uma linguagem "alfa" ... se isso é assim.
# "arrays" ;
class Vector {
Vector ( a , b , c ) {
this . x = a ;
this . y = b ;
this . z = c ;
}
get ( ) {
return [ this . x , this . y , this . z ] ;
}
add ( v ) {
if ( v is "list" ) {
return Vector ( this . x + v . at ( 0 ) , this . y + v . at ( 1 ) , this . z + v . at ( 2 ) ) ;
} else if ( v is "number" ) {
return Vector ( this . x + v , this . y + v , this . z + v ) ;
} else if ( v is "vector" ) {
return Vector ( this . x + v . x , this . y + v . y , this . z + v . z ) ;
}
return nil ;
}
show ( ) {
return "[" + this . x + "," + this . y + "," + this . z + "]" ;
}
}
let v1 = Vector ( 1 , 2 , 3 ) ;
let v2 = Vector ( 4 , 5 , 6 ) ;
let v3 = v1 + v2 ;
say v1 + " + " + v2 + " = " + v3 ;Confira mais alguns exemplos de código de mani e envie o seu aqui.
| ÁTOMO | Vscode |
|---|---|
![]() |
| Lua Brayden | Joe Rickard | Odin |
|---|---|---|
| Fundador | Contribuinte | Construtor fiel |