Skip to content
@SEAProject

SEAProject

SEALang has been created to be transpiled into Perl5. It bring a cool and fancy syntax that let you write perl functional code with the power of static typing

SEALang

SEALang is a language created to be transpiled into Perl5. SEALang bring a cool and fancy syntax that let you write perl functional code with the power of static typing (only at the linter/runtime). SEALang use the perl stdlib that has been created to bring Perl Object primitive wrapper that let you get "trustable" code.

Example of SEALang

import (Method_A, Method_B) from lib.pkg

sub echo(Scalar k,Scalar v) 
    print("key => $k, value => $v")
end

Array<Scalar> myArr (5,10,15)
// Or tell to the linter the type of the values in the array
// Array<Integer> myArr (5,10,15)
arr.push(25).push(30).reverse.forEach(echo)

String hello = 'hello world'
println[hello][typeof(hello) eq String]

Boolean test = true
if test 
    // true
end

Map<Integer> _t ( c => 10 )
_t->a = 5
_t->b = 10
println(_t->a)
_t.forEach( (Scalar k,Integer v) => print("key => $k, value => $v\n") )

Hash test {
    customVar => 'hash type!!!'
}

And the compiled Perl5 version :

use strict;
use warnings;
use lib::pkg qw(Method_A Method_B);

my $echo = sub {
    my ($k,$v) = @_;
    print("key => $k, value => $v");
}

my $arr = Array->new((5,10,15));
$arr->push(25);
$arr->push(30);
$arr->reverse;
$arr->forEach( $echo );

my $hello = String->new('hello world');
print $hello->valueOf."\n";
{
    my $retRef = ref($hello) eq "String";
    print "$retRef\n";
}

my $test = Boolean->new(1);
if($test->true) {
    # true !
}

my $_t = Hashmap->new({c=>10});
$_t->set('a',stdlib::integer->new(5));
$_t->set('b',stdlib::integer->new(10));
print "$_t->get('a')\n";
$_t->forEach(sub {
    my ($k,v) = @_;
    print("key => $k, value => $v->valueOf()\n");
});

my $hash = {
    customVar => "hash type!!!"
}

First Blessed object draft :

package test;
export (customMethod)

static String myVar = "hello world"

sub customMethod(Scalar A) 
    println(A)
end

class User 

    new(String name,Integer self.age) 
        println(test.myVar)
        self.name = name
    end

    sayHello() 
        println("hello ${self.name} with age ${self.age}");
    end

end

Pinned

  1. SEASchema SEASchema Public archive

    Schema API that let you write Perl5 code with JavaScript.

    JavaScript

  2. stdlib stdlib Public

    Perl5 standard object-oriented primitives created for SEASchema (to bring trustable type)

    Perl

  3. SEACompiler SEACompiler Public archive

    SEALang compiler (transpiler source to source)

    JavaScript 1

Repositories

Showing 4 of 4 repositories
  • .github Public
    0 MIT 0 0 0 Updated Aug 31, 2022
  • stdlib Public

    Perl5 standard object-oriented primitives created for SEASchema (to bring trustable type)

    Perl 0 MIT 0 0 0 Updated Dec 24, 2017
  • SEASchema Public archive

    Schema API that let you write Perl5 code with JavaScript.

    JavaScript 0 MIT 0 0 0 Updated Oct 18, 2017
  • SEACompiler Public archive

    SEALang compiler (transpiler source to source)

    JavaScript 1 0 0 0 Updated Sep 9, 2017

Top languages

Loading…

Most used topics

Loading…