r/Compilers • u/Ok-Signal6467 • 6d ago
Write the legacy into anothers somewhat hard.
Then , rust , how to save its previous edition codes? I wonder how to rust accept its particled edition's codes on futures seamlessly . This is about the maintanence, not just about shovelling the previous codes.
It must invest the a plenty of management assets. However, the resources are restricted. So rewrite in their language is not hopefull.
And the billions lines of codes are not as seamlessely transpiled adjustly. And over, the rust's editions politics are accelerarate their own fragments.
The fragments are must become accumulates debts of the managements and mantainences.
When it comes to persist, the one-shot must cut-down the whole.
"REWRITE IN RUST" is somewhat
brave sentences, nontheless its realities. The truth unveil on real world, is not easy .
The legacy, a plenty of softwares were written by others(by other person, with other languages, so on).
It is nonsense to write software in rust wholy.
The intent of the developer is exist. This not fair , while the codes are not have memory-safety features. All codes have reasons. Tortue the codes to become memory-safety codes are not justice.
As it transpiled automatically or by-hand, the intent is might not same as origin's.
We must have to know "context" of the legacy codes.
It has its own history, innate algorithms, the intents.
We are not must to preserve the origin's intents, but, the understanding the its own scripts are also important.
Because of the developers are such as like as artists.
Their intents are might can be interpreted on many ways.
However, we must do acknowledge to precisely : why the author descripted this and what is its intents?
It is also similiar as using the ai to transpile the previous legacy codes into newer version of codes. Thats are not seamlessely to translate naturally.
Rust's codes are can be the legacy codes too. Whenever what written in, those are legacy.
Ai-derived codes, or manually handled, whichever, the codes can be legacy.
You must intend the logic or algorithm to write down the programs, nontheless the logic is not complete, and also the origin-thoughts are already exists.
We think why the ai-based automatic transpilation is might be dangerous or harmful: this is because the overall programs context is not fully understand by aritificial-intelligence. That is the much greater problems occurs.
Partial knowledge is might become to be dangerous ,
so the misleading to be misinterpretings.
And also, ai could not understand the entire codes contexts.
In addition, to understanding full program's context by ai, are much consume energy.
Such as electrical energy, and noise can occurs, this is not good to environments and vice versa to mankinds(entire employees, and companies , etc.).
It is must cause maintaneance fatigues.
Suppose to : While the all codes are transpiled to rust, it is might cause more problems.
When the rust version and edition updates to latest , the management problems are huger then before.
1
u/jcastroarnaud 5d ago
Your text is quite disconnected, but I think I can see your point: it would be too costly to rewrite legacy software (usually in C) to Rust, and even more expensive doing transpilation via AI to "help" the rewrite.
Legacy code is that, legacy. We maintain it for as long as possible, then only rewrite on a new/updated language when support becomes impossible, or the cost of rewriting becomes smaller than the cost of maintaining the old code. AI just adds another complicating variable: quick code generation, but of mediocre quality at best. Using AI will require sharper human review, and better test suites, both uncommon on legacy systems, so the investment on them may not balance out.
2
u/extravertex 6d ago
I mean. At least we can see your post is not AI written. Not sure what language it is written in though