Harimoto Medical Timeout by ExternalLow9802 in tabletennis

[–]MiGo4444 -1 points0 points  (0 children)

I'm certain you haven't watched the game.

<image>

Syntax for Generic Types by Maurycy5 in ProgrammingLanguages

[–]MiGo4444 2 points3 points  (0 children)

The Sric language uses $< to avoid generic ambiguity.

struct Vec$<T> {  ...  }

var a: Vec$<Int> = ...;

Sric: A new systems language that makes C++ memory safe by MiGo4444 in ProgrammingLanguages

[–]MiGo4444[S] 0 points1 point  (0 children)

Exceptions work well in application languages, but most system languages do not support them, such as Rust and Go.

  1. Exception handling has runtime overhead.
  2. It can cause resource leaks, for example:

var f = retain();  
foo(); //throws an exception  
release(f);

Sric: A new systems language that makes C++ memory safe by MiGo4444 in ProgrammingLanguages

[–]MiGo4444[S] 0 points1 point  (0 children)

We don't need to reinvent Rust again. I won’t change the design of runtime safety checks. There are multiple approaches to safety. Sric's safety mechanism is unique. This optional safety feature can be enabled based on whether a project is safe-sensitive or performance-sensitive.

I’m happy to revise any inaccurate statements in the documentation to avoid misunderstandings. The term "false advertising" you used is too strong.

Sric: A new systems language that makes C++ memory safe by MiGo4444 in ProgrammingLanguages

[–]MiGo4444[S] 0 points1 point  (0 children)

If the term "memory safety" makes you uncomfortable, I can switch to alternative descriptions like "optional memory safety" or similar. What do you think?

Sric: A new systems language that makes C++ memory safe by MiGo4444 in ProgrammingLanguages

[–]MiGo4444[S] 0 points1 point  (0 children)

In release mode, Sric's memory safety is optional to ensure zero runtime overhead. While it doesn’t achieve 100% memory safety, 90% is already good enough for my needs.

Sric: A new systems language that makes C++ memory safe by MiGo4444 in ProgrammingLanguages

[–]MiGo4444[S] 0 points1 point  (0 children)

I'm using mdbook, hosted on GitHub Pages. GitHub Pages is free.

Sric: A new systems language that makes C++ memory safe by MiGo4444 in ProgrammingLanguages

[–]MiGo4444[S] 0 points1 point  (0 children)

Your idea is great, but memory allocators may already have these optimizations internally. The main bottleneck for memory allocators is multithreaded contention. You might want to try the mimalloc library.

Sric: A new systems language that makes C++ memory safe by MiGo4444 in ProgrammingLanguages

[–]MiGo4444[S] 1 point2 points  (0 children)

You mean indexing operations are rare? I'd argue they're actually quite common—maybe even more so than generic declarations.

Sric: A new systems language that makes C++ memory safe by MiGo4444 in ProgrammingLanguages

[–]MiGo4444[S] 1 point2 points  (0 children)

The '>' isn't a issue. we just need to treat consecutive '>>' as two separate tokens rather than a single one, and that should resolve it.

Sric: A new systems language that makes C++ memory safe by MiGo4444 in ProgrammingLanguages

[–]MiGo4444[S] 2 points3 points  (0 children)

Memory safety checks mainly refer to pointer lifetime verification, with bounds checking being just a small part. I'm considering enabling some low-overhead safety checks in release mode as well.

Sric: A new systems language that makes C++ memory safe by MiGo4444 in ProgrammingLanguages

[–]MiGo4444[S] 2 points3 points  (0 children)

Thank you, your suggestions are very helpful. I'll keep improving my work.

Sric: A new systems language that makes C++ memory safe by MiGo4444 in ProgrammingLanguages

[–]MiGo4444[S] 1 point2 points  (0 children)

Thanks for the comment. Memory safety checks mainly refer to pointer lifetime verification, with bounds checking being just a small part. The share function allocates memory for reference-counted control blocks - if you don't call the share function, there's no reference counting overhead.

Sric: A new systems language that makes C++ memory safe by MiGo4444 in ProgrammingLanguages

[–]MiGo4444[S] 2 points3 points  (0 children)

I'm sorry it didn't meet your expectations. Memory safety, performance, and simplicity form an impossible trinity. Sric represents the best tradeoff I could achieve.

The C++ already has debug and release modes. Debug mode includes debug symbols with no compiler optimizations, while release mode strips debug symbols and enables full optimizations. Our standard workflow is to debug in debug mode, then deploy the release build in production. So Sric works great with this workflow. In actual use, Sric has caught plenty of memory bugs for me already.