4 ms·
Curious to hear why this exists when Zig is further along (and more promising imho)
by c-cube 6y ago
Curious to hear why this exists when Zig is further along (and more promising imho)
- karmakaze 6y agoAnd similarly, the D language. Is there space between/around C, D, and Zig for another? I think the answer is probably yes until such time that people choose a language over C as the default for those use cases. It still hasn't happened although C++, Rust, and even Go are chipping away at it.
- rhabarba 6y agoRust does not intend to be a replacement for C though, while Go does (partially).
- Zababa 6y agoRust is used in places where C is used though. For example it is used for Python cryptography where C was used before https://lwn.net/Articles/845535/ https://lwn.net/Articles/845535/. I doubt Go could be used this way. What do you mean exactly by "does not intend to be a replacement for C"?
- rhabarba 6y agoRust was developed to replace (parts of) C++, initially. C++ has a different niche than C.
- steveklabnik 6y agoRust doesn't "intend" to replace any programming language because we don't really believe programming languages get replaced. Rust does want to be useful in the same niches where both C and C++ are useful, among other niches and languages in those niches.
- pjmlp 6y agoIt sure can, https://www.f-secure.com/en/consulting/foundry/usb-armory https://www.f-secure.com/en/consulting/foundry/usb-armory https://tinygo.org/ https://tinygo.org/
- Zababa 6y agoI was talking specifically about the cryptography part, sorry if I wasn't clear enough. I don't deny that Go can be used for "low level" or embedded development. But, I don't think Go can be used to create libraries used in other languages easily.
- mappu 6y agoGo can do this easily - you just do `go build -buildmode=c-shared` and put a magic //export FuncName comment before any function. This produces a C ABI .so (Linux) / .dll (Windows). Although the resulting library is a little bit heavy (1-2MB) because it bundles the Go runtime and GC, and initializes it on first load.
- Zababa 6y agoThanks, that's something I didn't know about.
- nick_ 6y agoRust is a No true Scotsman of programming languages.
- mariusor 6y agoProbably Drew wants to try his hand at a compiler and has the time to do it. Does it really need to be more than that?
- setr 6y agoThe post refers to an existing team -- "we" used for everything -- so he's presumably convinced other people to work on it as well. Unless they're all on the same page (because why not?), there must be something compelling about it.
- hackerbrother 6y agoI always wonder if "we" spend too much time on new languages and not enough on good libraries in existing popular languages.
- setr 6y agoThey’re really not that different — a language is essentially a library, but at a lower level of the stack (the hierarchy being OS > language > framework > library > application) From that perspective, it makes about as much sense designing a framework versus a language, relative to a library. The question then to justify a new language is to justify whether it could have been done with about as much benefit, but on a higher tier (thus, lower effort, for both the developer and the user)
- dnautics 6y agoDrew did take an interest in zig for a while. It does look awfully like zig. I think I see two major differences: First: > we want the first release to be a complete, stable, production-ready programming language with all of the trimmings so arguably drew is ahead of zig. My understanding is that Zig is being open now (there's a major breaking syntax change in the pipeline), but will be very conservative about what goes into 1.0, so there is a lot of tying off loose proposals and finishing out the language, and documenting everything ahead of getting to 1.0. That's going to a while with such a large community as zig's. Second: I'm guessing this new language will have less complexity in the "comptime" space. The syntax is really close. If I had drew's ear, I would almost have him write the spec to match Zig and market it as Zig--. Coda I'm a huge zig fanboy, and if it is up to being a "competition" I would guess that zig will do better. 1) Andrew is extremely skilled at figuring out? (marshalling?/delegating?/not overdoing?) the social/branding/growth of the language. 2) having had a more open initial design, Zig will cover far more interesting ground than drew's language. 3) I don't know if this is deliberate or accidental, but it seems to me Zig is following microsoft's "Embrace, Extend, Extinguish" philosophy quite well, with a holistic view of not just building a better language, but also replacing C toolchain components: killing make/automake/cmake, replacing cc, and now replacing ld, these are huge painpoints in the C ecosystem... On the other hand maybe it's not best to think too hard of programming languages as 'competing entities'.