Skip to content

Instantly share code, notes, and snippets.

@nikeee
Created June 30, 2014 17:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nikeee/f7e73f87115ad40c53bb to your computer and use it in GitHub Desktop.
Save nikeee/f7e73f87115ad40c53bb to your computer and use it in GitHub Desktop.
draft idea for a programming language
:/ Comment
:\
Comment block
:*/
:/ assigning variables
"abc" :> VAR
:/ throwing exceptions
:O("LOL ERROR")
:\
ternary operator
Like:
VAR = COND ? "wat" : "nicht";
:*/
COND :? "wat" :! "nicht" :> VAR
:/ define a function without parameters:
:F function_name :(
:? VAR :==) "abc" :( :/ if VAR == "abc"
:P("it works") :/ print "it works"
:)
:)
:C class_name :(
:F class_name :(
:/ constructor
:)
:D class_name :(
:/ destructor, should be sad some way :/
:)
:F instanzmethode :(
:P("lol")
:)
:F :S some_static-method :(
:P("ii am static")
:)
:+F :S some_public_static_method :(
:P("i am public static")
:)
:-F some_private_instance_method :(
:P("I am a private void")
:)
:#F some_protected_instance_method :(
:P("I am a protected void")
:)
:)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment