Ya Language

http://Ya-Lang.com . Designed and made by Pavel Senatorov, see Ya-Lang.com for emailing.

Ya is based on CeePlusPlus (C++) and gets most of C++ as is. Yet there is no compatibility with C++, C++ program is not a Ya program and cannot be compiled as is. Anyway it's

Main news in comparison with C++:

Appeared at 2012.

Works only in Windows for now.

== Example: Hello World ==

@HelloWorld.Ya; using ; $int($char[][] args) main

printf("Hello, %s!\n", args.Length > 1 ? args[1] : "World");
return 0;

== Basics of Ya ==

=== Block structure is described by tabs at starts of lines ===

Tabs at start of line are counted and used for specifying code blocks {...}, like in [[Python]]. But blocks made in single line with { and } are also supported. Typical Ya program has near to no one { and }.

=== Modules, ala #define and no project file ===

=== Double compilation aka [[Metaprogramming]] ===

=== Extensible syntax ===

=== Extensible lexical tokens ===

=== Support for databases and internal structures like databases === It will probably be done as library. It will be possible to write expression that works with a number of tables, which are sets (f.e. arrays, lists) of fielded type (of class), and perform join where sortby of SQL. In C# it is named [[Language Integrated Query]]. === Multiple names for any entity is allowed === Variables, functions, types and template argument requirements all may be named by a number of names. No need to use #define instead. Example: $int a b c = 100; - here you can use this variable by name a or b or c. === Description of types ===

=== Many small changes in the base of C++ ===

switch 10-5

  1. .3,7
printf("Wow! It's 0,1,2,3 or 7\n");
5
printf("Simple case!\n");
else
printf("default is written as default or else.\n"); }}

- each case starts without case and : after case values is not written. Case values can include many values and also ranges value..value, like in 0..3,7 - this case works if switched with 0,1,2,3 or 7. Also no need to write break; to break out of case - it is automatically included at the end of a case. But if it's required to continue on next case then continue; may be used - it jumps to the body of next case.

!any $StringEnum enum $char[]

Str1 = "lala", Str2 = "bebe"

!any $ErraType enum $int+:8 // i.e. they are unsigned bytes

eFatal, eErr, eWarn, eMess,


CategoryProgrammingLanguage