DEV Community

Cover image for 🌟 Introducing Gold: A Creative Programming Language for the Modern Web
Prasoon
Prasoon

Posted on

🌟 Introducing Gold: A Creative Programming Language for the Modern Web

🌟 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>
Enter fullscreen mode Exit fullscreen mode

✨ 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>
Enter fullscreen mode Exit fullscreen mode

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)