Giter Club home page Giter Club logo

soya's Introduction

Soya Programming Language

Jun Gong ([email protected])

Introduction

Soya is a programming language running on JVM. It has following features:

  • Intuitive Syntax
  • OOP features
  • Functional Programming features
  • Support many basic type literals (ex. collection, regular expression, file, url, date)
  • Pattern Matching features
  • Exception Handling
  • Advanced Assignment

Soya has some syntax like this:

lst := [1, 3, 'Apple', 'Peter', 2, 'House', 14]
lst[String] = 'X'
lst[int v] = v * 2
println(lst)  // Output: [2, 6, "X", "X", 4, "X", 28]

A more complex sample:

users :=
   * name: 'Peter'
     age: 16
   * name: 'Marry'
     age: 12
   * name: 'Scott'
     age: 78

users[age: 14..100].each { println(it.name) }

// Output:
// Peter
// Scott

users.each {
   match it
     | age: 0..50   -> println("{it.name} is young")
     | age: 50..100 ->  println("{it.name} is old")
}

// Output:
// Peter is young
// Marry is young
// Scott is old

Build and Install

To build everything using Gradle (the command below will download Gradle automatically, you do not need to download it first).

./gradlew installSoya

This will build project and generate the build/install folder, it contains soya jars, documentation, license and samples.

To build from IntelliJ IDEA:

./gradlew idea

Then open the generated project in IDEA.

To build from Eclipse:

./gradlew eclipse

Then import the generated project in Eclipse.

How to contribute

Forking and sending a pull request: https://github.com/mySingleLive/soya.

Discussion: https://github.com/mySingleLive/soya/issues.

License (BSD License)

Copyright (c) 2013-2014 Jun Gong

soya's People

Contributors

mysinglelive avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.