Skip to content

Latest commit

 

History

History
177 lines (163 loc) · 4.94 KB

Cosmo-Spec.md

File metadata and controls

177 lines (163 loc) · 4.94 KB

Cosmo Specification

v0.2.10α - © T.E.A de Souza 2020, All Rights Reserved.

An expressive notation drawing from natural scripts, symbolic formalisms and dingbats.

Header

# Sym Syntax Description
1 using

Blocks

# Sym Syntax Description
2 namespace
3 class
4 𐋆 delegate
5 enum
6 𐋂 interface
7 struct

Modifiers

# Sym Syntax Description
8 public
9 protected
10 internal
11 private
12 abstract
13 const
14 override
15 partial
16 readonly
17 static
18 virtual
19 🔒 sealed

Control flow

# Sym Syntax Description
20 if
21 else
22 else if
23 foreach
24 in
25 for
26 while
27 continue;
28 switch
29 case
30 default
31 ¦ break;
32 when
33 return
34 try
35 catch
36 (╯°□°)╯ throw
37 (˙▿˙) finally
38 return true;
39 return false;

Linq

# Sym Syntax Description
40 from
41 ¿ where
42 select
43 orderby
44 ascending
45 descending

Operators

# Sym Syntax Description
46 => as (→)
47 == equals (☰)
48 != unequals (≠)
49 >= greater or equals (≥)
50 <= lesser or equals (≤)
51 && and (∧)
52
53 operator Overloading operator
54 public static explicit operator Explicit type conversion
55 public static implicit operator Implicit type conversion

Primitives

# Sym Syntax Description
56 bool
57 byte
58 char
59 short
60 int
61 long
62 float
63 double
64 decimal
65 string
66 object
67 var

Keywords

# Sym Syntax Description
68 get
69 set
70 true
71 false
72 new
73 null
74 ⦿ this
75 void
76 params

Semantics

# Sym Syntax Description
77 Action Action pointer
78 Func Function pointer
79 𝕄 Dictionary Map type
80 𝕊 HashSet Set type
81 𝔼 IEnumerator Enumerable collection type
82 𝕃 List
83 Sqrt Square root
84 Sum
85 𝛑 pi (3.14...)
86 ± Append
87 Contains
88 ContainsKey
89 Exists
90 that

Idioms

# Sym Syntax Description
91 () => Action reference
92 .Count
93 .Length
94 🝠 .ToString()
95 .ToArray()
96 .Value
97 (this,

NUnit

# Sym Syntax Description
98 ؟ [Test] public void Test case
99 [SetUp] public void Fixture setup
100 [TearDown] public void Fixture teardown
101 ಠᴗಠ Assert.Throws

Unity

# Sym Syntax Description
102 GameObject
103 Component
104 Transform
105 Quaternion
106 Vector2
107 Vector3
108 Vector4
109 Vector2 Point2
110 Vector3 Point3
111 メ̂ Vector4 Point4
112 gameObject.AddComponent< AddComponent
113 GetComponent< GetComponent
114 [UnityTest] public IEnumerator Asynchronous test
115 yield return new WaitForSeconds Synchronous timer

Active Logic

# Sym Syntax Description
116 status
117 done() Complete task status
118 cont() Ongoing task status
119 fail() Failing task status
120 return @void(); Void token