Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce Characters package #1344

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

jquorning
Copy link
Contributor

Reduce use of Standard.ASCII

@mosteo
Copy link
Member

mosteo commented Mar 14, 2023

What's the issue with the Standard.ASCII package?

@jquorning
Copy link
Contributor Author

jquorning commented Mar 15, 2023

The capitalization is bad. I kept it ASCII to avoid to much change.
I think ASCII is declared package ASCII renames Standard.Ascii
A better way would be to say package Characters renames Ada.Characters.Latin_1

Latin_1

@mosteo
Copy link
Member

mosteo commented Mar 15, 2023

It's ASCII here: http://www.ada-auth.org/standards/12rm/html/RM-J-5.html

Not a big point in my book anyway...

@jquorning
Copy link
Contributor Author

jquorning commented Mar 15, 2023

It's ASCII here: http://www.ada-auth.org/standards/12rm/html/RM-J-5.html

It is in the Annex J.
If ASCII is needed it can be redeclared in the project library with package ASCII renames Standard.Ascii, I guess.

See 10 Program Structure and Compilation Issues. This is a major contribution of Ada.
I do not really know how a the program/project library is structured at its root.

Something like:

Program.Standard.ASCII
Program.ASCII

or

Standard.ASCII
Standard.Program

or something of that kind..

@@ -24,6 +24,7 @@ package Alr with Preelaborate is
use all type Simple_Logging.Levels;
pragma Warnings (On);

package Characters renames ASCII;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the way to go?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the idea is to avoid ASCII because of obsolescence, I'd say Ada.Characters.Latin_1 is preferable.

@mosteo
Copy link
Member

mosteo commented Mar 22, 2023

It is in the Annex J.

Ah, I hadn't realized that was the one with the obsolescent features.

@jquorning
Copy link
Contributor Author

It is in the Annex J.

Ah, I hadn't realized that was the one with the obsolescent features.

Do no not know all the details either :-)

@jquorning
Copy link
Contributor Author

It is in the Annex J.

Ah, I hadn't realized that was the one with the obsolescent features.

We ought try do design a 2023 community package tree parallel to the Ada package tree..
I read somewhere that the Ada tree is both something and nothing. Designed for portability.
Regarding utf8/ascii/unicode/whatever we could have a package like Root.Config or a variable in Root.Text_IO like Default_Encoding for starters. (I do not know so much about utf8/charsets/encoding, it is a kind of a blur to me)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants