Remix.run Logo
tosti 13 hours ago

There's so much repetition in there. E.g.: (adi-json.adb)

    if not W.After_Key (W.Depth) then
        -- things
    else
        W.After_Key (W.Depth) := False;
    end if;
    -- ...more things...
    W.After_Key (W.Depth) := False;
And what's the deal with those filenames? If you replace adi- with TIMMEH, you'll see what I mean.

Code should be more DRY (don't repeat yourself).

OneWingedShark 10 hours ago | parent | next [-]

GNAT (not Ada) has an implementation restriction that you cannot have multiple compilation-units in a single file; I believe that the dot-replacement is a holdover from when GNAT/GCC was dealing with DOS.

ovenpasta 12 hours ago | parent | prev [-]

I agree on the repetitions those need cleanup. Regarding filenames, it is a GNAT convention (the GCC's ada compiler) where we need to have the package name on it separated by -

OneWingedShark 10 hours ago | parent [-]

Ada has some excellent GENERICs, you can use them to great effect for reducing code-size.