Last active
November 6, 2019 09:42
-
-
Save tripulse/1904d36274e72d2314e64147150d6244 to your computer and use it in GitHub Desktop.
New and rich programming language.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$print("Hello World"); | |
# THESE ARE COMMENTS, THEY ONLY EXIST IT SOURCE CODE | |
# AND INGORED BY THE LEXER BEFORE COMPILING. | |
def x: f24 = 75; # Variables types can be defined while initalization but, cannot be changed later. | |
def y = 75; # EXCEPTION: if type is not explictly declared then type of variable can be changed later. | |
def z: inh = $format("%d", x); | |
# 'inh' keywords infers the type from the value but the type cannot be changed later. | |
def a: inh = 24_f32; | |
# Integral types can be written along with numerals. And, numerals could be formatted using underscores. | |
def @const b: inh = 48_f8; | |
# This is constant and neither the type nor the value can be changed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is just an idea of the language. I’ve no intents to develop the system for language.