Plastic Logo
Feature Plastic (Current) Rust
KeywordsBasic + Error HandlingExtensive
Data TypesBasic + List/Map/ArrayRich (u8, char, (), &str)
Ownership & BorrowingPartial (WIP)Core Feature
FunctionsBasic, DLL Import, ClosuresAdvanced (generics, lifetimes)
Variableslet, mut, publet, mut, patterns, annotations
OperatorsArithmetic, Logical, CustomFull set
Comments// only//, /* */, doc comments
Structs/Traits/EnumsSupportedstruct, trait, enum
Error Handlingtry, catch, throw, finallyResult, panic!
Imports/Pluginsimport, reference, using, DLLAdvanced modules, crates
File/Process I/OBuilt-inVia stdlib
HTTP/LocalhostBuilt-in serverVia crates
ConcurrencyChannels, ThreadsAdvanced (async, threads, channels)

Plastic Language Overview

Keywords & Syntax

Plastic supports an extended set of keywords including control flow, data modeling, error handling, and plugin system:

fn, let, mut, pub, if, else, while, for, return, match, struct, enum, trait, impl, interface, try, catch, throw, finally, import, reference, using, dllimport

Data Types

Ownership & Borrowing

Plastic includes experimental ownership and borrowing syntax: &, &mut, and supports borrow checks at compile-time (work in progress).

Functions

Support includes standard functions, closures, and DLL imports.

Operators

Includes arithmetic, logical, comparison, and custom operator aliases.

Comments

Single-line comments using //.

Structs / Enums / Traits

Plastic supports user-defined types and trait-based polymorphism.

Error Handling

Structured error handling: try, catch, finally, throw.

Imports & Plugins

import, reference, using, and native dllimport.

File and Process I/O

Functions: readFile, writeFile, runProcess, openFile, etc.

HTTP / Localhost

Built-in HTTP server functions: startHttpServer, GetHttpRequestMethod, SetHttpResponse.

Concurrency & Channels

Built-in thread and channel system: CreateNewThread, SendToChannel, ReceiveFromChannel.

Examples

HTTP Server


startHttpServer("8080");
while (true) {
    let method: string = GetHttpRequestMethod();
    let path: string = GetHttpRequestPath();
    let data: string = GetHttpRequestData();
    print("Received", method, path, data);
    SetHttpResponse("Hello from Plastic!");
}

File I/O


writeFile("test.txt", "Hello, file!");
let content: string = readFile("test.txt");
print(content);

Concurrency


SendToChannel("hello");
let msg: string = ReceiveFromChannel();
print(msg);

Download & Resources

Plastic Syntax in Visual Studio Marketplace

PlasticCMD / CLI

Plastic Source Code & DLL

Note: Plastic is evolving rapidly. For the most recent syntax and feature updates, check the documentation and GitHub repository.