[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help sought understanding shorthands wrt modules/packages

From: Juanma Barranquero
Subject: Re: Help sought understanding shorthands wrt modules/packages
Date: Wed, 23 Nov 2022 08:33:03 +0100

On Tue, Nov 22, 2022 at 8:38 PM Matt Armstrong <matt@rfc20.org> wrote:

> The argument is that all of these languages are all flawed in the same
> way, and that a package/module system designed today should aim for
> better.

That's an overgeneralization. Ada, for example, is free from Beaujolais effects, and it supports overloading of names, so use'ing a package will, at most, cause collisions detected at compile time and easily fixed. (And even these collisions will only happen if the overloaded functions have a similar parameter profile and you happen to use one of them in your code).

Of course in Ada it is, perhaps, more common today to rename imported packages as a short prefix, instead of "using" them, but that's for readability, which is a big emphasis in Ada culture.

I won't claim Ada packages are a perfect solution, but certainly they don't seem to me "flawed in the same way" that some others you mentioned.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]