Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a programming language which takes indent as containment markers? (and if so, which)

I'm wondering if such a syntax (borrowed from C#, mind you) is used by a programming language, i.e., tabs for containment, without any "End" directive.

class Character
    static string Name;
    static int Level;
    static Inventory Inventory;
    static double Health;

    Character(string name, int level)
        this.Name = name;
        this.Level = level;
        this.Inventory = new Inventory(this);
        this.Health = 1;

    void Die()
        this.Health = 0;

class Inventory
    Character Parent;
    List<Item> Items;

    Inventory(Character parent)
        this.Parent = parent;
like image 478
Lazlo Avatar asked Dec 07 '25 04:12

Lazlo


1 Answers

  1. Python
  2. Haskell
  3. Occam

These are the ones I know of.

like image 70
Jon Avatar answered Dec 09 '25 21:12

Jon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!