YakiiLanguageMold

Yakii’s Language MoldI have learned Python, Ruby, Perl, C and some LISP. I have discovered funny of learning programming languages. And I want to learn languages faster. So, I have created a tool to help me done my goal. It called Yakii’s language mold by me. I think it not only can help me learning faster, but also can help people raising their comprehension of programming language. If you understand better, you do batter. So I write down it. PrefaceYakii’s Language Mold is a tool. It means it is flexible, and you can modify it to fit your environment. And its goal is to help people building a clear blueprint of programming language. The blueprint is set up by three parts: syntax, semantic and philosophy view. (See Figure 1 Blueprint’s Structure)Figure 1 Blueprint’s StructureI will describe the three parts in the following content. Now, I put a list in which synopsizes are.Philosophy View:² The core concepts² The OOP mold² The design-target of the language² Date typeSyntax View:² Statement rules² Syntax BlockSemantic View:² Symbol semantic² Central semantic wordPhilosophyCore ConceptThere are some common concepts for all programming language. I list here. (Quote from my note)² Rubbish collection ² Object quotation² Dynamic type: Type is an objects' attribution not variables' attribution. A variable just is a name for object, it haven't types as an attribution by which people can distinct it. It's just a pointer that is used to act an efficient quotation of an object. ² Iterate: scan the elements that are belonged a set sequentially (one by one)² Domain rules.² Name-space: a tool that build the program's structure, allow repeated name's control.² Immutable: an attribute of an object that cannot be operated by the method, and usually returns a new object that usually is a copy of original object to respond methods invoking. ² An expression is just to let the interpreter calculating to get a value or an object. But a statement leads an action. (All programming language is the same)The OOP moldThe core concepts of OOP are common knowledge for programmers. So I wouldn’t repeat here. I just prompt you to focus on how the language supports these concepts.The design-target of the languageThe design-target of the language is a key that can help you to really grasp a new language. In the general, it reflects the design goal of author who designs the language. Such as, Ruby’s design-target is that free programmer from complex input while they are programming. So, Ruby’s statement is meaningful. You can express more with type less. The Perl’s design-target is to build a tool that can process the text fluently. Thus, the Perl involve the regular expression, and it just copies the C’s control structure. (Not design it for its own)Date TypeThe build-in date type is a basic element in program, so programming language provides them. They are:² Single Type (scalar quantity)n Numbern Charactern Boolean² Sequencen Listn Setn Dictionaryn Tuplen Arrayn Hashn StringSyntaxProgram is consisted by order list. So, the syntax is rules of organizing order. I recon there have two kinds of order. I call them statement and syntax block.StatementUsually, statement holds in a line, and is limited by a semicolon or a ‘\n’.My own statement concept evolves the common expression and common statement.A statement is consisted by mark and Symbol mark (arithmetic mark). (See Core Concept)Syntax BlockMy syntax block can cover the whole syntax structure in a programming language. It is consisted by head and body. Such as a function definition is a Syntax Block. (See Figure 2 Syntax Block)Figure 2 Syntax BlockAnd some control structures are also Syntax Block. (See Figure 3 If block)Figure 3 If blockThe iterator syntax can also be analyzed by Syntax Block. But it’s decorated by syntax sugar. Such as:1.upto(3) { |x| puts x }“1.upto(3)” is the central word, and “|x|” is body’s variable. The structure hasn’t decorator. (Don’t forget Ruby’s philosophy: less input)SemanticSymbol semanticsThe basic semantic unit is symbol (arithmetic mark, key words and assignment mark).There is one point that we need pay attention:² Type of returning or kind of action (Priority-level, combination). Such as:1 * 8Just return a number.max or minReturn an object.X = puts “Hello, I am Yakii.” #=> X = 1The “puts” is just a name of a build-in function. It will let an action, and return 1. Then ‘=’ assign the ‘1’ to variable X.Central semantic wordLet’s see the example:public viod display(int){ \\ some statements }Commonly, the head’s meaning will determine the body’s structure and usage. For this example, “display()” is a mark to indicate the body is function body. Thus the body just defines a sequence of order. The “display()” is also called central word, because it determine the main meaning of head. Let’s see another example:Foreach (@array) { print $_;}“foreach” is the central word in this example, because it determine a main meaning of head. It indicate the body is a iterate body. The decorator is limitation word for central word, such as “public, int and some name-mark”. 6 / 6。