Live data from Hacker News

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

jobs.apple.com

191–200 of 240 posts

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

#191
post #180

Earlier quoted context omitted.

> Sad but true, performance is possible in swift but it’s not very idiomatic and usually not safe. There's nothing sad about it. You pick the right tool for the job. Swift is not designed to be a reference tool in performance-sensitive applications, thus you pick the tools that are. There is no need to shoe-horn the wrong tool just because it's popular of fancy. A tool is just a way for technicians to express their s…

> There's nothing sad about it. Why? It's a drop-in replacement for Objective-C that allowed you to dip into C and C++ code in the same code file, even in one function. Now Swift is faster for most higher level scenarios a front-end developer deals with but it's slower than the C performance Objective-C allowed.

I.e. it isn't a drop-in replacement. There is nothing wrong about a language not being good at something. When you want to have everything, you get C++. And working with C++ is just sad.

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

#192
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.

"Performance" isn't an absolute, and, going by the fact C++ is apparently acceptable in some "performance" codebases, there's more to it than directly controlling every single RAM allocation and making every single use of memory take maximal advantage of cache. You can't even get that in C without deep knowledge of internal compiler details.

Rust gives no finer control than C does, overall, but it installs some guard rails to make the language less accidentally unsafe. That's proof that "performance" isn't the primary goal with this codebase; if it were, it would be re-written in assembly, and the guard rails be damned.

So Swift isn't immediately out, unless profiling deems it so.

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

#193

Converting code seems like an incredibly boring job.

Maybe for you... I find it pretty interesting... though you have to first learn, understand and document what it is doing, and then think about how you can adopt the function into the patterns of the new language.

That last part is key. Nothing like seeing code in a current language written like it's mainframe code. I've seen some really poorly ported code (and written plenty). The learning curve is pretty steep but it's great work if you enjoy it.

For me, my favorite part of working in software is the learning. New tools, languages, platforms, systems not to mention domain knowledge. In my career I've worked from government, banking, aerospace elearning, eCommerce and many things in between. What other career is such a great opportunity for continuous learning.

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

#194

Earlier quoted context omitted.

D missed the train because the creator(s) didn't open source it, instead they wanted to monetize it right away

I am sensing a lot of hostility in this thread and Walter Bright, the founder of D, is replying to direct accusations in this thread. Mods? What's going on HN?

Novelty accounts making idiot accusations is nothing new here, unfortunately.

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

#196

Why wouldn't they use Swift? Seems odd.

Why is this downvoted? It's a valid question. Chris Lattner, the creator of Swift, has stated many times his goal of Swift being the best language for all uses.

Ah yes, a creator of a language wanting his pet language to be the best language for everything. That's a first

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

#198

Why not incrementally convert it to modern C++?

I don't write C++ though I have written some C. I imagine it's easier to shoot yourself in the foot with C++ compared to Rust; it's specifically designed to be a safe language, whereas C++ had things like auto_ptr added

Why have a half-way solution of porting to modern C++ when you can just write it in Rust?

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

#199

Earlier quoted context omitted.

I have been told that this in fact is only really an issue in Quebec. I am not a lawyer, but, I don't believe it's an actual issue elsewhere in Canada.

In Alberta too. No surprise really. Both Quebec and Alberta (also Ontario) have LOTS [1] of political influence from traditional engineering companies. You know, not that long ago in Alberta, you could use "Software Engineer" without a P.Eng license. Then the engineering society (APEGA) sued someone (Raymond Merhej) who did that [2]. But Raymond won in the courts. So APEGA appealed. But Raymond won the appeal in the…

Yeah, I'm from Alberta and went to the U of A (but for A B.A. philosophy [unfinished] not CS).

Back in the 90s I ended up having to come out here to Ontario to get work in software development; not just because there wasn't any work in Edmonton really but because companies there really weren't even going to look at someone without a CS or engineering degree. Every once in a while I muse about moving back there and I take a look around at job postings and I think even with my 8 years as a SWE at Google (and a 20 year career in dev generally) I might have a hard time landing a job there; lots of postings heavily emphasizing the academic angle and obviously trying to pull people straight out of the university.

It's a more conservative business culture in some ways.

Post reply on HN