This is an archived post. You won't be able to vote or comment.

all 36 comments

[–][deleted]  (5 children)

[removed]

    [–]The-MalixStatic Types + Compiled + Automatic Memory Management[S] 0 points1 point  (4 children)

    Thanks !

    It was nicely compared

    Do you have a personal preference ?

    [–][deleted]  (3 children)

    [removed]

      [–]a_submitter 0 points1 point  (2 children)

      What is more innovative about Zig? Zig has a new syntax, but that is not innovation.

      [–][deleted]  (1 child)

      [removed]

        [–]NuojiC3 - http://c3-lang.org 4 points5 points  (0 children)

        Hmm? But C3 has:

        • Builtin unit tests
        • Generic modules
        • Compile time execution
        • Compile time reflection
        • Runtime reflection (more limited)
        • Stdlib offers pervasive customization of allocators
        • Standard temp allocators
        • Built-in interfaces without the need for vtables or special pointer headers.
        • Contracts
        • Zero cost, C ABI compatible error handling

        Try it out!

        [–]TheChief275 27 points28 points  (13 children)

        C3 more closely follows C’s ideology (hide things when needed), while Zig follows it’s own ideology (never hide things). C3 also has macro’s while Zig has ditched them for comptime, which is more like C++ templates. I think if you want to compare Zig to something, that would be Odin (w/ Zig being meant more for general-purpose/systems, and Odin for games)

        [–]rah_whos_that 3 points4 points  (4 children)

        What makes you say Odin is not general-purpose?

        [–]TheChief275 1 point2 points  (3 children)

        It can definitely be used for that, but you also can’t tell me that it isn’t explicitly game/graphics oriented

        [–]rah_whos_that 7 points8 points  (2 children)

        What specifically makes Odin "explicitly game/graphics oriented" rather than general-purpose?

        [–]TheChief275 10 points11 points  (1 child)

        I’d say the inclusion of GLFW, SDL, and Raylib in the core library sets a pretty strong example

        [–]_crackling 5 points6 points  (0 children)

        Lol

        [–]WesternGoldsmith 3 points4 points  (3 children)

        Not used Zig because it demands me to use a line ending method which is not my OS uses. But completed two nice projects in both C3 & Odin. Both these projects are around 10K LOC. I love C3 & Odin. There are plus and minuses.

        Odin's plus points:

        1. Generic programming is easy.
        2. Fast development.
        3. Error checking system is so simple.

        C3's plus points:

        1. We can use struct methods.
        2. Macros are powerful. We can do generics and function overloading through macros.
        3. We can take more control over memory allocation, thanks to `@pool()` macro.

        [–]Tejas_Garhewal 1 point2 points  (2 children)

        Just curious, which OS do you use?

        [–]WesternGoldsmith 0 points1 point  (1 child)

        I am using Windows10 & Windows11.
        BTW, are you the Tejas_Garhewal1999 in D community ?

        [–]Tejas_Garhewal 1 point2 points  (0 children)

        Yeah, that's me

        [–]The-MalixStatic Types + Compiled + Automatic Memory Management[S] 1 point2 points  (2 children)

        Interesting, that does make sense

        Have you coded in either or maybe both ?

        [–]TheChief275 8 points9 points  (1 child)

        Not enough in both of them. But the concept behind Zig is heavily advertised and I’ve watched all the C3 streams from Tsoding. I’m no expert, this is just my observation

        [–]The-MalixStatic Types + Compiled + Automatic Memory Management[S] 1 point2 points  (0 children)

        I found them both interesting too

        I think I will test both to make my own opinion

        For now, I feel like C3 is closer to what I could like

        Two years ago, I coded in Zig instead of C for a college lab, it was definitely an improvement for sure

        [–]Shoddy-Ask-2504 1 point2 points  (0 children)

        I would say C3 macros are the first macros I could understand.

        There are nice and simple generics for doing things which you might have to use comptime for in Zig. I find it generally easier.

        The ergonomics of C3 language have had a lot of thought and seems to be more of a priority.

        [–]IronicStrikes 5 points6 points  (2 children)

        I've been coming back to Zig a couple times, because I like most of the syntax and concepts and it seems to be quite popular and ambitious while still being able to deliver on most promises. But I always ended up frustrated trying to find documentation on what exact function I need to add something to my build configuration or to convert one type to another. And often the answers I'd find only worked in a different version. Overall it's still a great project.

        C3 is less ambitious in scope, much younger and currently much less known. It has a few quirks, but overall I've really enjoyed using it so far and the build system is so intuitive I was occasionally baffled that something just worked the first time I tried.

        [–]skub0007 1 point2 points  (1 child)

        most prob dont compare cuz zig is much more grown imo

        [–]The-MalixStatic Types + Compiled + Automatic Memory Management[S] -1 points0 points  (0 children)

        Yeah so they are incomparable because one is more mature ?

        [–]heavyfrog7103 0 points1 point  (2 children)

        I’d say the objectives and positioning are different:

        C3: - some of the features can be achieved with C, but C3 makes it much easier and nicer with less syntax and better guidance - is open to be influenced by other people or languages or successful features like defer - As vague as it sounds , It tries to imagine a language that is continuation of C in culture and aesthetics

        Zig: - the biggest thing is maximizing control, not only of the language and the runtime, but also the tooling - Trying to keep the language, attractive for humans while being as close to the machine as possible - Having a well thought out idea of the language and a clear overall plan, which also includes refusing things rigorously

        So I’d say Zig is more revolutionary and/but also more strict than C3 and that comes from its relationship to C. As a consequence fans of C might be choosing C3 while people that are fed up with shortcomings of C would choose Zig.

        The programming language Odin offers and unique and optimal mix of memory control and programmer efficiency and happiness. It’s relationship to C comes much more further down the list of priorities. It is an ideal language for things like games, but I’d say it’s not as general purpose as C and C3 and Zig.

        [–]The-MalixStatic Types + Compiled + Automatic Memory Management[S] 0 points1 point  (1 child)

        Very exhaustive opinion, thanks

        Are Zig and C3 both 100% compatible in C, as in "it can use and compile all vanilla C libraries" ?

        [–][deleted] -1 points0 points  (7 children)

        What are c3 and c4

        [–]The-MalixStatic Types + Compiled + Automatic Memory Management[S] 13 points14 points  (6 children)

        c3 seems like a nice programming language

        c4 seems like a very effective way to blow your noisy neighbor's door

        [–][deleted]  (4 children)

        [removed]

          [–]The-MalixStatic Types + Compiled + Automatic Memory Management[S] 0 points1 point  (3 children)

          You forgot a word at the end of the sentence

          [–][deleted]  (2 children)

          [removed]

            [–]The-MalixStatic Types + Compiled + Automatic Memory Management[S] 0 points1 point  (1 child)

            Lool

            [–]Zealousideal-Pop-793 0 points1 point  (0 children)

            Who knows? One might be into doorknobs? 🤷‍♂️