ProLang
h
simontiger (17)

Introducing ProLang...

...the best lang for beginners. It's also the best lang for non-beginners.

Source: https://repl.it/@ProLang/ProLang - Just click run, it will run a sample program. You will get a package installation screen before it runs, though. If you get program is already running, please run it again, or something like that, do what it says. Run it again.

Features

  • Data Types:
    • Numbers
    • Strings
    • Booleans (true, false)
    • null
    • Lists
    • Instances
  • Basic Operations
    • +
    • -
    • *
    • /
    • ^ (powers)
    • Parentheses
  • print()
  • input()
  • Variables
    • Syntax: var name = value
  • Conditionals*
  • Loops*
  • Functions*
    • Anonymous Functions
  • Classes*
  • Imports
    • Syntax: import name

* Syntax shown in examples

Examples

Hello world is quite simple:

print("Hello, world!")

Arithmetic is quite easy too:

print(2 + 2)

You can also do variables:

var a = 100
print(a)

if statements work as well. Elifs / elses don't though, so here's how you would make a simple size classifier:

var a = ___
if a < 10 {
  print("Small")
}
if a < 20 and a >= 10 {
  print("Regular")
}
if a < 50 and a >= 20 {
  print("Large")
}
if a >= 50 {
  print("HUGE")
}

for loops have a slightly odd style:

for i = 1 to 10 {
  print(i)
}

You can also do functions quite easily:

function greet(name) {
  print("Hello " + name)
}

var name = "Simon"
greet(name)

Lists are quite simple too:

var list = ["a", "hello", "b", "goodbye"]
print(list)

You can even have a rudimentary version of classes!

class Dog(name){
  var trained = false
  var name = "hello"
  
  function bark(name) {
    print(name + " is barking!")
  }

  function train(name) {
    print(name + " is training...")
    trained = true
  }
}

var tim = new Dog("Tim").train("Tim");
var tom = new Dog("Tom").bark("Tim");

Credits

Team

  • @simontiger (high-level features, CLI, ...trying to understand what AndyPython was doing)
  • @AndyPython (idea, the implementation, lots of stuff)
  • @arnavsirigere (just support :) )
    Thanks to them, I could not have done this without them (though AndyPython was a bit pressuring and thought the deadline was before I'm posting this 😅)

Source

https://repl.it/@ProLang/ProLang - Just click run, it will run a sample program. You will get a package installation screen before it runs, though. If you get program is already running, please run it again, or something like that, do what it says. Run it again.

You are viewing a single comment. View All
tangert (67)

love it so far! excited to try it out. love the focus on simplicity and especially having only one way to write functions