You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's nothing wrong in repeating the type name in each enumeration value, but note that in Ada the identifier is not global; the same value could be repeated in another type and there wouldn't be a conflict. The repeated name can disambiguated when using it by context or explicitly by Type'(Value).
Are you sure this is needed in the private part of the specification? There are only two reasons to put something in the private part:
When it is required by the compiler as completion of something in the public part.
When you want to make something visible in the subsystem (child packages of this package), but not to external users of the package.
You can leave it to the body, if it is only used there.
The indentation of broken lines looks too short to me, but that's a question of taste.
I only reviewed this specification, and the rest looks pretty good to me. Congratulations on your good progress learning Ada!
The text was updated successfully, but these errors were encountered:
libusb-ada/src/usb.ads
Line 9 in c3b6164
A popular style is to put the
use
at the same line as the corresponding with.libusb-ada/src/usb.ads
Line 62 in c3b6164
There's nothing wrong in repeating the type name in each enumeration value, but note that in Ada the identifier is not global; the same value could be repeated in another type and there wouldn't be a conflict. The repeated name can disambiguated when using it by context or explicitly by
Type'(Value)
.libusb-ada/src/usb.ads
Line 154 in c3b6164
Are you sure this is needed in the private part of the specification? There are only two reasons to put something in the private part:
You can leave it to the body, if it is only used there.
The indentation of broken lines looks too short to me, but that's a question of taste.
I only reviewed this specification, and the rest looks pretty good to me. Congratulations on your good progress learning Ada!
The text was updated successfully, but these errors were encountered: