JavaScript powers much of the modern web. It's flexible, powerful, and has a huge ecosystem. But building secure web applications can still be challenging.

Developers need to think about problems like:

Cross-site scripting (XSS)

Unsafe handling of user input

Accidental exposure of sensitive data

Insecure access to browser APIs

Mistakes involving permissions and trust

Frameworks, libraries, and security tools help, but what if we could prevent more of these mistakes at the language level?

Introducing an idea: FluxScript

I'm exploring a concept for a new web programming language called FluxScript.

The main goal is simple:

Make secure coding the default, rather than something developers have to remember every time.

Some ideas I'm considering:

Untrusted input by default – User input should be treated as untrusted until explicitly validated.

Safer HTML handling – Make unsafe HTML injection difficult or require explicit permission.

Capability-based permissions – Code should only access resources and browser capabilities it has been granted.

Compile-time security checks – Catch potentially dangerous operations before the code runs.

JavaScript interoperability – Make it possible to work with existing JavaScript libraries and web projects.

These are proposed design goals, not implemented features. FluxScript is currently at the concept and research stage.

I want to hear from the developer community

Before writing a compiler or building a prototype, I'd like to understand whether this idea solves a real problem.

A few questions:

Could a security-first programming language meaningfully reduce common web vulnerabilities?

Can existing languages like TypeScript achieve the same goals with better tooling?

What security features would you want built directly into a language?

What would make developers willing to try a completely new language?

I'm especially interested in feedback from people experienced in JavaScript, TypeScript, compiler development, programming language design, and application security.

I'm open to criticism and alternative approaches. The goal is to explore whether this idea is worth building.

What do you think? Is a security-first web programming language worth exploring?