π Introducing Gold: A Creative Programming Language for the Modern Web
Hello, Devs! π
Iβm beyond excited to introduce you to something Iβve been working on passionately β a fresh and expressive programming language called Gold.
Gold isnβt just another scripting language. Itβs a browser-first, CDN-ready, and minimalistic language designed to be creative, declarative, and beautifully reactive β all without the traditional if
, const
, or let
. Instead, it uses a command-style interface and its own virtual DOM engine called HindDom.
β¨ Think in commands. React with intent. Build in Gold.
π Why Gold?
Gold was born from a desire to simplify web-based programming β to remove the boilerplate and provide a command-driven alternative to verbose scripting syntax. The goal? Make programming feel like instructing, not just coding.
No need to set up tooling or frameworks. Just link the Gold runtime and youβre ready to go!
π Quick Start with CDN
You can run Gold right in the browser β no build tools required. Here's how to get started instantly:
<script src="https://pjdeveloper896.github.io/Gold-programing-/dist/Gold.min.js"></script>
<script src="https://pjdeveloper896.github.io/Gold-programing-/dist/HindDom.js"></script>
<script>
Β const gold = new Gold();
Β // Declare a type-safe variable
Β gold.type("name", "string");
Β gold.set("name", "Gold User");
Β // Console output
Β gold.print("Welcome to Gold!");
Β // DOM binding and reactive updates
Β gold.bind("name", "username");
Β gold.eventWatch("name", val => {
Β Β gold.print("Updated name: " + val);
Β });
Β // Render using HindDom (Virtual DOM)
Β gold.hindDom.render({
Β Β tag: "div",
Β Β props: { id: "app" },
Β Β children: [
Β Β Β { tag: "h1", children: ["Hello from Gold"] },
Β Β Β { tag: "p", children: ["Reactive DOM powered by HindDom"] },
Β Β Β { tag: "span", props: { id: "username" } }
Β Β ]
Β }, document.body);
</script>
β¨ Core Features
Gold brings some powerful and beginner-friendly tools to the table:
- π¨οΈ
print(x)
β Console output - β
err(e)
β Console error - π‘οΈ
type(name, "string"|"number"|"boolean")
β Type-safe variable declarations - βοΈ
set(name, value)
/get(name)
β Dynamic value access - π
bind(name, elementId)
β Live DOM variable binding - π
eventWatch(name, callback)
β Reactive watchers - π
goldArray(...items)
β Arrays with undo support - π¦
goldObject(obj)
β Objects with change tracking - π§
goldFunc(meta, fn)
β Functions with metadata - π
customFetch(url, onDone, onFail)
β Built-in HTTP requests - π§±
hindDom.render(tree, root)
β Lightweight Virtual DOM engine
π§ͺ Full Example
<script src="https://pjdeveloper896.github.io/Gold-programing-/dist/Gold.min.js"></script>
<script src="https://pjdeveloper896.github.io/Gold-programing-/dist/HindDom.js"></script>
<div id="app"></div>
<script>
Β const gold = new Gold();
Β gold.type("score", "number");
Β gold.set("score", 42);
Β gold.bind("score", "scoreDisplay");
Β gold.eventWatch("score", (v) => {
Β Β gold.print("Score updated to " + v);
Β });
Β gold.hindDom.render({
Β Β tag: "div",
Β Β children: [
Β Β Β { tag: "h2", children: ["Scoreboard"] },
Β Β Β { tag: "span", props: { id: "scoreDisplay" } }
Β Β ]
Β }, document.getElementById("app"));
</script>
This example shows how you can bind variables to HTML, watch for updates, and create a virtual DOM structure β all using Gold commands.
πͺ .gold
File Support
While Gold currently runs inline in HTML, support for .gold
files is in the roadmap. Soon, you'll be able to write structured, component-like code in dedicated .gold
files and load them into the browser using a lightweight script loader.
π― Project Goals
- β Eliminate traditional JS and Hinglish-style syntax
- β Command-first, human-readable scripting
- β Built-in reactivity and DOM integration
- β Virtual DOM without frameworks
- β CDN-first, browser-first development
π¦ CDN Links
Copy these into your HTML to get started:
Gold Runtime
https://pjdeveloper896.github.io/Gold-programing-/dist/Gold.min.js
HindDom Virtual DOM
https://pjdeveloper896.github.io/Gold-programing-/dist/HindDom.js
π¨βπ» About the Creator
Gold is developed and maintained by @pjdeveloper896, a passionate web developer and language designer exploring new ways to code creatively and intuitively.
π¬ Iβd love to hear your thoughts, feature ideas, or feedback on Gold. Letβs make this language something the dev community truly owns and evolves together.
π¬ Final Thoughts
If youβre tired of writing the same boilerplate code and want a fresh take on scripting that blends declarative thinking, reactivity, and minimalism, give Gold a try.
π No transpilation. No setup. Just link it and start building expressively.
Build expressively. Run boldly. Think in Gold.
Top comments (0)