5 ms·
I really like how when Andrew makes a decision about something related to Zig, he outlines how other programming languages do it and gives his thoughts. My que
by Decabytes 4y ago
I really like how when Andrew makes a decision about something related to Zig, he outlines how other programming languages do it and gives his thoughts.
My question is. I feel like Zig is trying to do a lot of things that GO set out to do. To reduce a lot of complexity of programs by removing hidden control flow, macros etc. But how will Zig keep itself from repeating the mistakes GO made that make people dislike it?
- tines 4y agoI haven't used Zig at all, but doesn't the fact that Zig supports from-what-I-understand pretty powerful metaprogramming facilities already put it way ahead of Go in that regard?
- AndyKelley 4y agoThank you for the compliment. I have some interesting news for you... Go is a smashing success, wildly popular, and eating Java's lunch. It is an objectively incorrect generalization to say that people dislike Go.
- acedTrex 4y ago> It is an objectively incorrect generalization to say that people dislike Go It is not, people USE go, they do not like go really.
- lordgroff 4y agoReally? I like Go, I might even love it.
- phinnaeus 4y agoI like Go
- deleted 4y ago[deleted]
- thadt 4y agoThis is true, I don't really like Go. After years of writing code in Assembly, C, C++, Perl, Basic, C#, Java, Python, Rust, JavaScript, TypeScript, Lua, Zig, and Go I find that what I really like is good tooling, and code that is easy to read and reason about. Go the language and toolset happen to do this really rather well at the moment though.
- bmurphy1976 4y agoNonsense. I love it and I've been programming since the 80's. I watched (and used) C++ as it grew into the monstrosity it is today. I've written and maintained production code in F#, C#, Python, Ruby, Perl, Java, JavaScript, Go, PHP, Lua, VBScript, Visual Basic, C, and C++ and every variant of shell scripting imaginable. I've spent time working with Erlang, Haskell, Rust and a variety of other exotic languages because I found it interesting. I created a port of Clojure's Transducers to C# because I could. I am not afraid of abstractions, functional programming, or complicated CompSci concepts. And yet I keep going back to Go.
- booleandilemma 4y agoI like Go as a language in the abstract sense, but the experience of writing Go code is so tedious to me. Refusing to compile if there's an unused variable or unused import is too harsh - at least give me the option to make these things warnings.
- titzer 4y ago
- pa7ch 4y agoAgreed, go has kept me liking programming because, for me, it most the most reliable tool for making trustworthy software. All langs have tradeoffs and areas they excel in but go brings me the most joy/motivation. Its nice to see a language with similar philsophies tackle the space where go isn't as good at: when you don't want a GC and you need to interface with C. For many that is Rust and I respect it, but I think Rust values concurrency "safety" too high and makes too many compromises in language design to achieve it. Memory safety is a BIG deal to me, without it, sufficiently complex software has never ending CVE's but concurrency bugs just doesn't cause anywhere close to the same number of security problems (orders of magnitude) and crashing programs is fine in most applications and I find concurrency bugs usually are easy to fix early in application lifecycle.
- zozbot234 4y agoRust only protects against data races, not general concurrency bugs.
- pron 4y agoWhoa, slow down there :) Go is certainly a success in absolute terms, making it to the top ten in some rankings, but at age 13 -- an age by which virtually all languages have either reached or neared their all-time peak with only a single exception I can think of -- it's only ~1/10th as popular as Java [1][2], and not eating nearly as much of its lunch as PHP or Ruby did back in the day. [1]: https://www.devjobsscanner.com/blog/top-8-most-demanded-languages-in-2022/ https://www.devjobsscanner.com/blog/top-8-most-demanded-lang... [2]: https://www.hiringlab.org/2019/11/19/todays-top-tech-skills/ https://www.hiringlab.org/2019/11/19/todays-top-tech-skills/
- auggierose 4y agoWhat is the exception?
- AndyKelley 4y agoFair point! Thank you for adding nuance to the discussion.
- aidenn0 4y agoStroustrup's law applies here: there are two types of languages: languages people complain about and languages nobody uses.
- deepsun 4y agoZig doesn't offer garbage collection. And also no Rust's complex memory tracking. So it's doesn't really free you from memory-related bugs, just like good-old C. But it's a "better C" IMHO.
- pverghese 4y agoYou just need to link in boehm c implementation and use that as the allocator just like chooosing any other allocator in zig. That's how easy it is.
- Arnavion 4y agoThey're saying the lack of GC is an advantage over golang, not that it's a deficiency. Or if you're suggesting a GC to solve the memory unsafety, a GC only solves leaks and doesn't do anything for use-after-free or simultaneous unexpected mutations.
- pverghese 4y agoI'm saying you have the option to use a gc or not. It's as simple as changing the allocator you use