Skip to content

v1.1.1

Choose a tag to compare

@thewhynow thewhynow released this 24 Jun 04:20
29384b3

The name of this programming language has now been changed to G because of the languages generality
The filetype for this program is now .g
Several bugs have been fixed and a few new things have been added.

  1. You are now able to access elements inside a list, no matter how deep:
    the code [1, [2, 3]] // 1 // 1 is now valid
    in addition, you are also able to change said elements inside a list, no matter how deep
    [1, [1, 2]] // 1 // 1 =/ 3
    the '=/' sign is now used to change the value of any non-variable type

  2. Classes, or something similar to them have been implemented!
    collecs are basically structures in C with a constructor method
    some example code:
    collec Person = (name, age){out("Person created!");}
    The keyword collec is used to specify a collection declaration
    The properties specified in the parenthesis are assigned just as they are in C, according to the inputs in the constructor

    To create an instance of a collec, you simply run the collec type as a function, passing in the values specified:
    bob = Person("bob", 25); -> Person created! The constructor runs after a collec is created and the values are assigned
    The Person function returns a collec with the values specified

    To access properties within a collec, you use the . sign, and to change them you use the =/ sign
    out(bob.age) -> 25
    bob.age =/ 26 -> bob.age is now 26

Thats it for now, im planning on adding methods to collecs in the future!