DEV Community

Cover image for ๐ŸŒŸ Introducing Gold: A Creative Programming Language for the Modern Web
Prasoon  Jadon
Prasoon Jadon

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)