• AggressivelyPassive@feddit.de
    link
    fedilink
    arrow-up
    0
    ·
    5 months ago

    Compared to Java, it makes me write the same data structures three or four times.

    Just an example: if I want to be able to insert a struct via Diesel, I need to write the actual entity, an entity without the id for inserts and maybe some other structures for queries. Also, I need to write a schema file defining the DB plus an SQL statement for actually creating the needed tables.

    Another example: explorative testing. Sometimes you need to disable chunks of code for testing purposes. Maybe that long running computation or a DB query, etc. Rust often forces you to write a bunch of “corrections” to make the code seem correct again.

    I get that this is useful, but for my line of work, it’s just a pain in the ass.