Live data from Hacker News

Apple is looking for engineers to convert its code from C to Rust

jobs.apple.com

181–190 of 240 posts

Re: Apple is looking for engineers to convert its code from C to Rust

#181
post #152

Earlier quoted context omitted.

I don't see any obvious arguments why. It integrates very well with existing C code, a lot can be done with structs and static dispatch, there are pointers, etc. Not Rust level capabilities, but pretty good.

> Not Rust level capabilities And you answered your own question. If you aim for performance, "pretty good" doesn't cut it.

> If you aim for performance, "pretty good" doesn't cut it.

It does in the overwhelming majority of real cases.

Re: Apple is looking for engineers to convert its code from C to Rust

#182

Earlier quoted context omitted.

Thank you for responding. There's always a room for an awesome programming language. I've never used D but as a professional c++ programmer, I admire what you set out to do. (Assuming you are the creator....) Please ignore the naysayers. HN is diverse in degree and area of knowledge and some people even think electron is the only cross platform gui framework.

Oh, I've always had plenty naysayers. If I ever paid any attention to them, I'd be a total failure.

I think D didn't gain the momentum because of GC. O/B system is interesting but makes the syntax ugly (at least in Rust's case).

Had D gone with a (deterministic) ref counting like Swift and Vala, it would've been much more popular I think. Such memory management keeps the syntax cute :) while not sacrificing the determinism.

Re: Apple is looking for engineers to convert its code from C to Rust

#183
post #65
post #42

Earlier quoted context omitted.

That is nice. I think many inside Canada wouldn't mind relocating for a role like this, but I doubt someone would be willing to trade California's winter for Alberta's, regardless of the job.

> but I doubt someone would be willing to trade California's winter for Alberta's, regardless of the job. I was just down around the LA area, and I'll gladly take -40 winters for the rest of my life than deal with that traffic and air pollution.

That's why they invented Santa Monica.

Re: Apple is looking for engineers to convert its code from C to Rust

#184
post #181

Earlier quoted context omitted.

> Not Rust level capabilities And you answered your own question. If you aim for performance, "pretty good" doesn't cut it.

> If you aim for performance, "pretty good" doesn't cut it. It does in the overwhelming majority of real cases.

But not at the trillion dollar company that is Apple, which is what we are talking about

Re: Apple is looking for engineers to convert its code from C to Rust

#185
post #178

Earlier quoted context omitted.

Swift’s performance isn’t really up for high-performance network processing, at least not yet.

Swift is a LLVM front-end just like Rust.

You are saying that like it must then be as fast as Rust by this virtue.

Re: Apple is looking for engineers to convert its code from C to Rust

#186
post #178

Earlier quoted context omitted.

Swift’s performance isn’t really up for high-performance network processing, at least not yet.

Swift is a LLVM front-end just like Rust.

That doesn't magically make Swift and Rust equally performant.

Re: Apple is looking for engineers to convert its code from C to Rust

#187

Earlier quoted context omitted.

Swift is not yet a zero-abstraction-cost language like C or Rust which might be one of their concerns.

C is far from zero-abstraction-cost. For example you can't do a generic qsort supporting user defined types with zero overhead, other than with preprocessor macros (ugly, unsafe, unmaintainable).

I think you've inverted the meaning of "zero abstraction cost" here. It's not that writing abstract code is well-supported and free; it's that the language basics aren't built upon a stack of expensive abstractions.

Re: Apple is looking for engineers to convert its code from C to Rust

#188
post #122

Any thoughts on why they’d be using Rust rather than Swift for this work?

If you're writing performance sensitive code and/or correct code, Rust makes more sense. Rust makes more sense for almost any use-case over Swift unless you're building Apple clients.

Swift still hasn't really escaped its niche of being a language for end-users to build clients for the Apple ecosystem with trade-offs in mind for those end-users who are just building clients (rather than, say, implementing a safer openssl).

For example, even Rust's web framework story is more mature and benchmark competitive than Swift's. Go to https://www.techempower.com/benchmarks/ and filter for just Rust and Swift.

I say all this sadly as someone who builds iOS apps. I would find it very weird that someone was using Swift of all language for infrastructure projects.

Re: Apple is looking for engineers to convert its code from C to Rust

#189
post #178

Earlier quoted context omitted.

Swift is a LLVM front-end just like Rust.

You are saying that like it must then be as fast as Rust by this virtue.

No, semantics and idiomatic code matters but I don't think performance oriented Swift code would be significantly slower than Rust. I might be wrong though - feel free to share relevant benchmarks.

Re: Apple is looking for engineers to convert its code from C to Rust

#190
post #97

Earlier quoted context omitted.

Arguably not. Rust has a lot of things that C doesn't, like classes, lifetimes, and the borrow checker, which can be jarring to deal with for programmers used to other languages. And, unlike most other languages I've seen, you can't just sit down and write a "bad" Rust program and then refine your abilities; the compiler won't let you do the "bad" things, so you have to get everything write from the word go.

Rust does not have classes.

In the wild, the meaning of class ranges from whatever it means in the bowels of theoretical OOP, to a struct that has thing.method() invocation syntax. I'd wager about 99% of people don't get more academic about what classes are beyond the latter definition since it's the only way in their language to create a group of state and then associate some methods with it, which is exactly what Rust has.
Post reply on HN