Just ask it to rewrite the shitty code you wrote in a language you barely understand to “follow standard best practices in <language>” or something like that and it will add advanced typing features, functional programming for iterables, advanced exception handling, proper concurrency handling, optimize control flows, use better equivalent functions, etc.

As long as you understand the foundations of these concepts in at least one language anybody can become pretty close to an expert in most languages instantly. Especially since most of them are C based and pretty similar

The output will sometimes change the logic but I mean that’s pretty easy to catch and fix

Rip C++ nerds that memorize the entirety of each releases manual to shave off 3ms in every single function

  • Simon 𐕣he 🪨 Johnson@lemmy.ml
    link
    fedilink
    English
    arrow-up
    9
    ·
    edit-2
    3 days ago

    This is only really useful in low expressiveness languages where there is not a huge set of language enhancements possible through libraries. Think Java exception handling for example.

    In essence it works if you “best practices” are things like don’t use switch statements.

    It doesn’t work if you best practices are things like use Result<T, E> from this functional result library.

    Essentially LLMs don’t really work “at scale” if you need anything more complicated than what the average internet tutorial code is in your language.

    Same with perf.

    Also this only works 60% of all the time though if that, so the more requirements you pile on the less likely it will hit all of them properly.