News for hackers. Stuff that matters.
Re:Show HN: A Modern GUI Library for Ada: CSS Styling, XML U... by tosti on Monday August 24, 2026 @01:44PM (#49423355)
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).

Re:Show HN: A Modern GUI Library for Ada: CSS Styling, XML U... by OneWingedShark on Monday August 24, 2026 @03:53PM (#49425015)
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.
Re:Show HN: A Modern GUI Library for Ada: CSS Styling, XML U... by ovenpasta on Monday August 24, 2026 @01:50PM (#49423447)
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 -
Re:Show HN: A Modern GUI Library for Ada: CSS Styling, XML U... by OneWingedShark on Monday August 24, 2026 @03:58PM (#49425077)
Ada has some excellent GENERICs, you can use them to great effect for reducing code-size.