Skip to content

Instantly share code, notes, and snippets.

@tripulse
Last active November 6, 2019 09:42
Show Gist options
  • Save tripulse/1904d36274e72d2314e64147150d6244 to your computer and use it in GitHub Desktop.
Save tripulse/1904d36274e72d2314e64147150d6244 to your computer and use it in GitHub Desktop.
New and rich programming language.
$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.
@tripulse
Copy link
Author

tripulse commented Nov 6, 2019

This is just an idea of the language. I’ve no intents to develop the system for language.

The work is completely free to use with no licensing whatsoever. If this idea inspires you to make a language then it‘s great.
You just have to give small credit to me for the core idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment