Zig

All things Programming
Post Reply
User avatar
Mardok
Sanitation Engineer
Posts: 17
Joined: Tue Dec 22, 2020 12:09 am

Zig

Post by Mardok »

I've been keeping an eye on the Zig language and am thoroughly impressed with its development. The one thing I've been disappointed with is its lack of runtime interfaces, but hopefully its comptime keyword will allow people to make their own vtable implementations.

Whether or not it can actually displace C... prolly not. Anyone else staying up to date with this language?
I guess you could say the road to hell is paved with Ivy League degrees. - Thomas Sowell
User avatar
Henry Crunn
Site Admin
Posts: 276
Joined: Fri Dec 18, 2020 2:04 pm
Location: 56N 3W

Re: Zig

Post by Henry Crunn »

Something displacing C or no more likely than FORTRAN or COBOL being replaced.
All have a large body of code that justworks, so there is no value in rewriting it.
--
You can't get the wood.
You can't get the 'shiver me timbers' wood' you know.
User avatar
Mardok
Sanitation Engineer
Posts: 17
Joined: Tue Dec 22, 2020 12:09 am

Re: Zig

Post by Mardok »

Who wants to put down $5 that says Zig will make C the FORTRAN equivalent in the year 2060?
I guess you could say the road to hell is paved with Ivy League degrees. - Thomas Sowell
User avatar
wswartzendruber
Pornography Historian
Posts: 50
Joined: Thu Dec 31, 2020 1:21 am
Location: Idaho, U.S.A.

Re: Zig

Post by wswartzendruber »

What does this do that Rust doesn't?
User avatar
Henry Crunn
Site Admin
Posts: 276
Joined: Fri Dec 18, 2020 2:04 pm
Location: 56N 3W

Re: Zig

Post by Henry Crunn »

Mardok wrote: Thu Jan 21, 2021 2:57 am Who wants to put down $5 that says Zig will make C the FORTRAN equivalent in the year 2060?
Not me, I won't be around to collect, I hope.
I would be 107 :)
--
You can't get the wood.
You can't get the 'shiver me timbers' wood' you know.
User avatar
Mardok
Sanitation Engineer
Posts: 17
Joined: Tue Dec 22, 2020 12:09 am

Re: Zig

Post by Mardok »

wswartzendruber wrote: Thu Jan 21, 2021 3:32 am What does this do that Rust doesn't?
Wrong question. What you should be asking is "What's the problem domain this language is aimed to solve, and does it apply to my particular area of expertise, which is *insert job here*?"

But Rust has the borrow checker and runtime interfaces, Zig does not. On the other hand, Zig has the comptime keyword which lets you do cool things like create serializers on generic structures (generates compiled code, not generated at runtime) https://github.com/ziglang/std-lib-orph ... zation.zig
I guess you could say the road to hell is paved with Ivy League degrees. - Thomas Sowell
User avatar
wswartzendruber
Pornography Historian
Posts: 50
Joined: Thu Dec 31, 2020 1:21 am
Location: Idaho, U.S.A.

Re: Zig

Post by wswartzendruber »

Mardok wrote: Thu Jan 21, 2021 11:36 pm
wswartzendruber wrote: Thu Jan 21, 2021 3:32 am What does this do that Rust doesn't?
Wrong question.
If you think that's the wrong question, you shouldn't have put Zig up against C.
User avatar
Naib
Site Admin
Posts: 502
Joined: Sat Dec 19, 2020 2:20 am

Re: Zig

Post by Naib »

So why should I consider this over say ... Julia or golang?

Presently python is my go-to with the odd bit of C but I will jump to Julia once the 3rd party modules exist covering my needs
The best argument against democracy is a five-minute conversation with the average voter

Great Britain is a republic, with a hereditary president, while the United States is a monarchy with an elective king
User avatar
cokey
Extreme Unicyclist
Posts: 1376
Joined: Thu Dec 17, 2020 11:24 pm
Location: UK

Re: Zig

Post by cokey »

wswartzendruber wrote: Thu Jan 21, 2021 3:32 am What does this do that Rust doesn't?
Or Visual Basic :lol:
User avatar
Mardok
Sanitation Engineer
Posts: 17
Joined: Tue Dec 22, 2020 12:09 am

Re: Zig

Post by Mardok »

wswartzendruber wrote: Fri Jan 22, 2021 7:02 pm
Mardok wrote: Thu Jan 21, 2021 11:36 pm
wswartzendruber wrote: Thu Jan 21, 2021 3:32 am What does this do that Rust doesn't?
Wrong question.
If you think that's the wrong question, you shouldn't have put Zig up against C.
I didn't, the Zig creator did.

https://andrewkelley.me/post/intro-to-zig.html

It looks like his whole goal is to compete with C.
I guess you could say the road to hell is paved with Ivy League degrees. - Thomas Sowell
User avatar
Mardok
Sanitation Engineer
Posts: 17
Joined: Tue Dec 22, 2020 12:09 am

Re: Zig

Post by Mardok »

cokey wrote: Sat Jan 23, 2021 1:16 pm
wswartzendruber wrote: Thu Jan 21, 2021 3:32 am What does this do that Rust doesn't?
Or Visual Basic :lol:
Anyone who doesn't write their code in FORTRAN is a pleb.
I guess you could say the road to hell is paved with Ivy League degrees. - Thomas Sowell
User avatar
cokey
Extreme Unicyclist
Posts: 1376
Joined: Thu Dec 17, 2020 11:24 pm
Location: UK

Re: Zig

Post by cokey »

Mardok wrote: Sun Jan 24, 2021 12:54 am
cokey wrote: Sat Jan 23, 2021 1:16 pm
wswartzendruber wrote: Thu Jan 21, 2021 3:32 am What does this do that Rust doesn't?
Or Visual Basic :lol:
Anyone who doesn't write their code in FORTRAN is a pleb.
++
User avatar
ajgreen
Bride Kidnapping Expert
Posts: 208
Joined: Sat Dec 19, 2020 8:49 am

Re: Zig

Post by ajgreen »

It sounds like NSDAP salute
The fastest speed of a caravan is the speed of the slowest camel.
User avatar
Mardok
Sanitation Engineer
Posts: 17
Joined: Tue Dec 22, 2020 12:09 am

Re: Zig

Post by Mardok »

Zig heil, gas ze Juden!
I guess you could say the road to hell is paved with Ivy League degrees. - Thomas Sowell
Post Reply