noodledoodletwo

Joined 4 years ago

Karma
12
Submissions
16
Member since
May 17
View on Hacker News

Recent submissions

Comment · 4 years ago
I recommend trying it again. Consider how old the language is, 7 years is a really long time ago.

It may not be the smallest language, but, it compiles pretty tightly.

Comment · 4 years ago
The productivity cost is mostly up front, once you understand borrowing it's seriously not bad in 99% of cases. Also, you can be initially productive in C or C++, but how much time goes into trying to fix undefined behavior, threading issues,etc. More importantly, when do those hours get spent? Is it after a customer is screaming into your support chatbot, or is it before you launch during normal development? To me that's the difference and the killer feature. That's why ms, aws, etc are using it. Not because it's new and marginally/debatably better then c/c++.

Once I started realizing what the borrow checker was saying it wasn't "fighting the compiler" I realized what I was asking the compiler to do was really not a good idea. It becomes your friend basically.

I didn't make this post to shill rust, I'm pretty language agnostic to my own detriment... The point is, it's worth considering and trying it again if you didn't get it the first time around. Rust took me 2x to become a tool I'd use, I honestly hated it at first.

Comment · 4 years ago
I actually disagree with that and think it encourages bad practices in people who don't know better. The rise of fuzz testing on these old c applications following this kind of mentality is a constant source of cves . Why expose users to problems, if it's easy not too?

Also it's not like that safety costs much of anything. You really can get comfortable writing rust, especially "easy rust" like a single thread cli app. It really is easy, even convenient.

Either zig is a different tool to rust, in which case I get it. Or people should be waiting for zig to be mature, meanwhile rust has been stable for half a decade, and at this point "just works". I'm not going to sit through an addendum static analyzer and all the bugs that come with making one for a few years. Other people whose appetite for risk is higher will though, and I wish them the best. I've seen efforts in other languages, my conclusion is that it's much better to have it built in...

Comment · 4 years ago
I'll believe it when I see it hit 1.0 and has a healthy user base.
Comment · 4 years ago
It's really not that hard to use once you invest some time into it. I know where you are coming from, but appeasing the compiler actually means "I am writing safe code". Rather then "it compiled let's see what happens in production"
Comment · 4 years ago
What environment cannot run C?
Comment · 4 years ago
Thanks for explaining, I really appreciate it.
Comment · 4 years ago
Yea but for the most part you can avoid macros, and areas where you can't you can consider them to be keywords in my opinion anyways. Macros aren't all bad, but they do get abused a lot and make a nightmare for others. Fwiw Ive only written one macro and it was for learning purposes only.
Comment · 4 years ago
Fair enough thanks for explaining. Basically if you want to make your own Malloc or things like it, zig is friendlier. Will say though, I've used rust for gamedev, and found the experience to be really nice. Was I writing my own memcpy though, nope.

It's funny how in rust you can write raw asm, but there seem to be quirks somewhere in the middle.

Comment · 4 years ago
See I got downvoted a bit... Let me rephrase, other modern languages offer something along the lines of these, of the things that aren't there for say rust, close integration with c/c++ is nice. Ie rust has nostd, etc.
Comment · 4 years ago
Does a really short summary of this read kind of like, "zig is a modern c, but I like using rust as a modern c++"?

Agree, Tokio is a little tricky for people new to rust no doubt, but it's tricky for a reason. It's saving lives in production.

Comment · 4 years ago
I see where you are coming from, zig is easier to learn, but zig doesn't offer what rust does with respect to safety. That feature is so hard for me to ignore. I respect it though, some people want to be up and running with a new technology in a day or whatever, rust doesn't give you that unless you are very seasoned.
Comment · 4 years ago
D nim and a few others offer nicer syntax over what's normally C for sure. Yea it doesn't surprise me that an established product had trouble incorporating rust, but at the same time, there's a reason why they went through with it right? Memory safety, no data races, etc. Like there is a motivating reason for using it. Meanwhile lots of other products have found ways of integrating Rust and some of them are risk averse products.
Comment · 4 years ago
Yea I feel like most of these differentiators aren't things most people care about barring one. Tight integrations with c/c++ is potentially useful, beyond that I don't really get it. It's kind of like Hare in that regard?
Comment · 4 years ago
Cool article.

I can't figure out why i am supposed to care about zig beyond it's fun? I get that it's interesting and more safe than C (honestly though what the hell isn 't).

Say you write rust pretty regularly for new product development, what does zig offer to make my life better, my products more stable, etc?

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton