Giter Site home page Giter Site logo

yogwoggf / expressive Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vurv78/expressive

0.0 0.0 0.0 748 KB

Expression, but it's Typescript (with extras). Replacement for Expression2, Lemongate, Starfall

Home Page: https://vurv78.github.io/Expressive/web/index.html

License: GNU General Public License v3.0

Lua 96.95% TypeScript 1.90% HTML 0.84% CSS 0.31%

expressive's Introduction

Expressive Linter Badge License Expressive Discord Website

Expression, but it's Typescript with extras

Expressive is the hopeful final solution to the Expression programming languages. It was originally a fork of Expression3, but has become a full rewrite. It is modeled after Typescript.

Note

This is a work in progress. Adding this to the server may be dangerous. And yes this is codenamed Expression4.

This could potentially give players access to serverside lua. Yes. It's that bad.

Differences from E2

Practically everything. There are classes, you can finally make lowercase variables, lambdas, and whatnot. Everything is neatly in libraries, like holograms.create

This also leverages the powerful Syper editor instead of the wire editor, which comes with autocomplete, "intellisense", code folding, custom themes and more.

Example Code

// You can create lowercased variables now.
// 'var' creates a global variable. It does not follow javascript/ts convention as function scoping is really horrible anyway.
var ops = 55;
ops++;
ops--;

// New function definitions typescript style.
// Note that despite this example having a lack of explicit type annotations, this is a *strictly* typed language.
// The types are inferred by the compiler.
function bar(foo: int, bar: int) {
	return foo + bar;
};

// This is not a part of typescript, and custom to Expressive.
// These are expression blocks, which allow you to block your code into scopes for organization.
// You can get the return value out of the last expression in the scope through implicit returns.
{
	var global = 55;
	let str = "๐Ÿค–";

	{
		// Boolean values!
		let anotherone = true;
		{
			// Typed builtin array types. No more array()[1, number]
			// Every value inside of it must be the same type.
			let an_array = ["Hi"];
		}
		// 'str' also exists in here

		// 'anotherone' is dropped.
	}
	// 'global' exists in here
	print(global)
}
// 'global' exists cause it uses 'var', which defines a global variable
print(global);
// print(str); -- Errors, 'str' is only defined inside of the above scope.

expressive's People

Contributors

vurv78 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.