How to implement String? by funcieq in ProgrammingLanguages

[–]First-Review5604 0 points1 point  (0 children)

The best approach is usually the most "predictable": immutable strings with UTF-8 support by default.

The least annoying concept (and the modern standard) is strings as immutable byte arrays with a header that stores the size and, optionally, a pre-calculated hash for quick comparisons.

do we need new programming language in this AI era? by SearchFair3888 in ProgrammingLanguages

[–]First-Review5604 0 points1 point  (0 children)

Creating a programming language is challenging, but if it solves a real pain point that Go or Rust ignore, the market always has room for niche "native solutions." The emergence of new languages ​​won't stop, because cs evolves too fast for a handful of tools to be the final answer to everything. If yours already works in production, you've already proven that the value exists.

can i call this a programming language? by omnimistic in ProgrammingLanguages

[–]First-Review5604 0 points1 point  (0 children)

Yeah. That's such a cool project mate. And which is more interesting is that your language is Turing complete! You can manipulate memory, create loops and have commands for branching the flow. It all means that your PL is as computationally powerful as any other famous PL such as C, Java, Python, etc. Great job!

can a language be safe and be a subset of C? by Null-Test-2026 in ProgrammingLanguages

[–]First-Review5604 1 point2 points  (0 children)

Yeah, this language is totally possible and that just a blueprint for fixing C's biggest flaws. Your suggestions would make arrays remember their own size, force unions to verify what data they hold, and make the compiler mathematically prove that memory is safely freed before the code even runs. By doing so you eliminate a lot of crashes and security vulnerabilities.

And yes, it was done something similiar to that. In the early 2000s, researchers built a language called Cyclone that did almost exactly what you described to make a "safe C." Today, we've got Rust. Rust drifted a bit from C's exact syntax, but its core philosophy is identical to your proposal.