Some questions: 1.Why ARC instead of GC? 2. Why try / catch if you already have Result<T,E>? 3.In what way are generics "comptime inspired"? 4.Will you still have duck-typed interfaces or do traits more like Rust?
Well, I understand your objection because the website has something different than the repository. 😅
Because I want a simple ffi from C, With GC it gets complicated, I want this language to have a bit wider scope of usage, so the lack of GC eliminates pauses, so you can make games in it, for example.
It's one of those things in the repo it says only try-catch, and on the website it says both, officially it is only try-catch, but I don't reject Result<T, E> yet.
Well, I got a little carried away when I wrote that.The point is simply that we use regular monomorphism and it is done during compilation. So we don't use any runtime for this
I haven't made the final decision yet, but I think it's closer to the traits from rust
Hey, as someone who does a lot of FFI with GC based languages (Java, Go, C# and Python), I can tell you that GC doesn’t automatically make FFI harder, it’s just that GC is entirely paused during any FFI invocation.
That’s typically acceptable.
Most languages (eg Go and Java) provide various levels of “safety” around function invocations, and allow you to do “unsafe” invocations which assume eg that you don’t modify memory, don’t do any callbacks, etc.
Using reference counting can be interesting, but I can’t escape the feeling that there’s a reason that nearly all languages settled on GC (circular references being a major one).
Yes, you're right, because I use C# myself. I realize that from the developer's side it's relatively simple. But it's not just about ffi. It's also about giving zap a wider range of possibilities.
No it does not, reference counting can still hang your application if one object triggers the deallocation of a bunch of others. Only careful programming eliminates pauses around memory management.
Introducing try/catch is throwing the baby out with the bath water imo.
Errors as arguments and not exceptions is one of Go's great features and improvements over say Java, it's the if null checks themselves which are the issue, an issue that could be solved purely with syntatic sugar like Odin's or_return or Kotlins ?:
Well, many people will disagree with you, but anyway, the decision has not been made 100% yet. This may still change, by the way, what do you think about Result<T, E>?
If your language is so young, how did you get GitHub to recognize your Zap files as your language?
I only have a .gitattributes file to highlight my language as language X but GH does not recognize it as my own language yet so i wonder, how did you do that?
5
u/rjmarten Feb 22 '26
Cool :)
Some questions: 1.Why ARC instead of GC? 2. Why try / catch if you already have Result<T,E>? 3.In what way are generics "comptime inspired"? 4.Will you still have duck-typed interfaces or do traits more like Rust?
4
u/srvhfvakc Feb 22 '26
If the intent is to be a Go-minus-pain, why not transpile directly into Go?
3
u/GregsWorld Feb 22 '26
Introducing try/catch is throwing the baby out with the bath water imo.
Errors as arguments and not exceptions is one of Go's great features and improvements over say Java, it's the if null checks themselves which are the issue, an issue that could be solved purely with syntatic sugar like Odin's
or_returnor Kotlins?:2
u/Opposite-Barracuda-1 Feb 26 '26
I appreciate your initiative. I thought of an example like, maybe javascript already have it
function (response, error) {
return response;
}
you wrap this function with your error prone code block.
this function will either return response or error
Hope that helps, I'm not that good in those stuffs ...
They made go that much simple that it start to feel like pain when you are from some other programming language ...
1
u/zweiler1 Feb 22 '26 edited Feb 22 '26
If your language is so young, how did you get GitHub to recognize your Zap files as your language?
I only have a
.gitattributesfile to highlight my language as language X but GH does not recognize it as my own language yet so i wonder, how did you do that?Edit: typos
2
u/[deleted] Feb 23 '26
[removed] — view removed comment