нового языка придумал:
pack SomePackage
_SOME_PRIVATE_STATIC_CONST string = '0.0.0'
SOME_PUBLIC_STATIC_CONST u16 = 3
_some_private_static_var string = 'v. ' + _SOME_PRIVATE_STATIC_CONST
some_public_static_var u16 = SOME_PUBLIC_STATIC_CONST
_some_private_static_function ()
// ...
some_public_static_function ()
>> some_public_static_var + 4
class SomeClass
#_some_private_static_var
#~some_protected_static_var
#some_public_static_var
#some_public_static_function ()
// ...
#~some_protected_static_function (value i32) i32 >> value - 2
#_some_protected_static_function (value i32) i32
SomePackage.some_public_static_var = value + 32
>> SomePackage.some_public_static_var
_some_private_var array of i32 = [0..15]
~some_protected_var array of char = ['d'..'p']
some_public_var u16 = SomePackage.some_public_static_function()
constructor (
some_constructor_var i32,
some_constructor_var_with_default string = 'some string',
@some_public_instance_var string = 'Some string',
@~some_protected_instance_var bool = true,
@_some_private__instancevar u64 = 123456,
...other_vars_array
)
// constructing instance
init (some_init_var bool)
// initialize instance
some_public_function (some_function_var i8 = -5)
// ...
~some_protected_function ()
// ...
_some_private_function ()
// ...
<some_public_getter () i32 >> _some_private_var[0]
>some_public_setter (value)
_some_private_var[0] = value + SomePackage.SOME_PUBLIC_STATIC_CONST
class SomeClassTwo
constructor (@some_count u32 = 0)
add()
some_count += SomePackage.SOME_PUBLIC_STATIC_CONST
some_var = new SomeClass(27)
some_var.init(true)
some_var_two = new SomeClassTwo(10)
SomePackage.some_public_static_var = SomePackage.some_public_static_function()
some_var_two.add()
Готовы к таким приключениям? 😅
У такого языка должна быть какая-то ну просто нереальная киллерфича, чтоб хоть как-то нивелировать этот ужасный синтаксис)
absolutely disgusting
а почему тип объявляется после переменной, а не до?
Обсуждают сегодня