Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> why would you be better equipped to write a library for some domain-specific purpose than the original author?

This is how you avoid growing as a programmer.



But that's how you grow as a software shipper.

Our job is not to program crap again and again, it's to deliver some value for the high fees we charge. Rewritting a working library to migrate language is really hard to defend...


No it’s not. You didn’t write it the first time, and grow from writing it the first time. Writing and shipping something in a new programming language is a fantastic way to learn both. This has only become contentious as people try to come up for a reason why rewriting things in Rust is bad, when really it is about as benign as trends go. I never heard the same complaints about rewriting things in Go (another language I love, btw) and even JS had less naysayers somehow.

You may question the usefulness of having “x but in Rust” and that is fair. However, people keep answering the reasons why you might do something like this and yet like amnesia the same bad opinions come out again next time.

— Sincerely, someone who also ships.


Rewriting software written using Python, Java, and Ruby in Go is entirely different from rewriting software written using C and C++ in Rust. Go has easily quantifiable advantages over those other runtimes regardless of the original code's correctness.


People rewrite C and C++ software in Go too. In fact, unlike Rust, most Go software has no C dependencies at all. This is precisely the result of rewriting everything in Go.

To be clear I’m not suggesting you should always rewrite something versus just wrap it, not at all. I’m just saying the reasoning for not doing it being “you didn’t write the original so what do you know” is very offensive to me; how are you supposed to learn?! People write NES emulators all the time even though they already exist. While most are purely for practice it doesn’t really matter: they wanted to write it, they wrote it, they learned. Discouraging people from writing something that they want to write is upsetting to me.


Most of the common C dependencies were implemented in Go before its public release - https://golang.org/doc/go1. These implementors are exactly the "better-equipped" original authors to which the blog post was referring.

Most programmers are programmers for hire, and it would be a waste of everyone's time to re-implement (for example) libdispatch in Rust. If someone wants to write it on their own time for their own edification and no other purpose, fine -- but half-assed internal implementations of common functionality are a significant drag on the lives of other working programmers.


All of this has absolutely, truly, nothing to do with rewriting something in Rust. You could also rewrite the same library again in C and have the exact same conundrum.

Also, people build dependencies on effectively “hobby” projects all the time. Open source in particular works well this way because the dependents have a good reason to contribute back; the users become stakeholders and contributors. The same may not be true of internal software, but again, this has little to do with the concept of rewriting something in Rust.

This is really diverging into a discussion that has nothing to do with the original paragraph I addressed.


People typically write NES emulators in their spare time, not on a job where others will be expected to maintain their science project.


Nothing in the article suggests it is addressing only work “on the job.”


Can't see what you would really gain rewriting from Java to Go.


Go can have a much smaller memory footprint than Java.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: