# Hi guys, I'm new to Ada, any advice

**URL:** <https://forum.ada-lang.io/t/hi-guys-im-new-to-ada-any-advice/4801>\
**Category:** General\
**Created:** [October 6, 2026, 8:21am UTC](https://forum.ada-lang.io/t/hi-guys-im-new-to-ada-any-advice/4801 "2026-10-06T08:21:31Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eggchese](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/eggchese/32/1109_2.png) [@Eggchese](https://forum.ada-lang.io/u/Eggchese)\
**Post date:** [October 6, 2026, 8:21am UTC](https://forum.ada-lang.io/t/hi-guys-im-new-to-ada-any-advice/4801/1 "2026-10-06T08:21:31Z")

</div>

So that’s my first time using Ada alongside with my main language Rust to make some project, I heard that Ada gives you more safety so I’m into it

---

<div class="post-metadata">

**Author:** ![krischik](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/krischik/32/420_2.png) [@krischik](https://forum.ada-lang.io/u/krischik)\
**Post date:** [October 6, 2026, 8:36am UTC](https://forum.ada-lang.io/t/hi-guys-im-new-to-ada-any-advice/4801/2 "2026-10-06T08:36:43Z")

</div>

> [@Eggchese](#):
>
> I heard that Ada gives you more safety so I’m into it

Which is indeed true. You might want to read the [Strongly typed language](https://learn.adacore.com/courses/intro-to-ada/chapters/strongly_typed_language.html) and [Design by contracts](https://learn.adacore.com/courses/intro-to-ada/chapters/contracts.html) chapters.

Since you are from Rust memory management will be important to you. Ada memory management is stack based. That is very different from the heap based memory management from C style languages have. You might want to read [The Secondary Stack](https://docs.adacore.com/gnat_ugx-docs/html/gnat_ugx/gnat_ugx/the_stacks.html#the-secondary-stack). Ada does have a heap but it’s used sparsely.

---

<div class="post-metadata">

**Author:** ![kevlar700](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/kevlar700/32/1118_2.png) [@kevlar700](https://forum.ada-lang.io/u/kevlar700)\
**Post date:** [October 6, 2026, 9:08am UTC](https://forum.ada-lang.io/t/hi-guys-im-new-to-ada-any-advice/4801/3 "2026-10-06T09:08:27Z")

</div>

> [@Eggchese](#):
>
> I heard that Ada gives you more safety so I’m into it

In that case then you might want to use Ada SPARK Bronze mode to start but perhaps you should get used to Ada first (debatable as Rod Chapman advised me to start with SPARK enabled but I didn’t and some say get to know Ada first 🤷🏻‍♂️).

My tip for spark would be to use Gnat Studio and alr with gnatprove. Then in the SPARK menu (after alr edit to run gnat studio) start with Examine all and click do not report warnings but this may not be necessary on a small example project. Then move to higher modes as you desire with Bronze being a good default.

> **[8. Applying SPARK in Practice — SPARK User's Guide 28.0w](https://docs.adacore.com/spark2014-docs/html/ug/en/usage_scenarios.html)**

> **[Releases · AdaCore/gnatstudio](https://github.com/AdaCore/gnatstudio/releases)**
>
> GNAT Studio is a powerful and lightweight IDE for Ada and SPARK. - AdaCore/gnatstudio

---

<div class="post-metadata">

**Author:** ![OneWingedShark](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/onewingedshark/32/305_2.png) [@OneWingedShark](https://forum.ada-lang.io/u/OneWingedShark)\
**Post date:** [October 6, 2026, 1:01pm UTC](https://forum.ada-lang.io/t/hi-guys-im-new-to-ada-any-advice/4801/4 "2026-10-06T13:01:53Z")

</div>

> [@Eggchese](#):
>
> my first time using Ada

Here’s my Golden Rule for using Ada: _Use the type-system to describe your problem-space, then use **that** to solve your problem._

IOW: (in general) don’t cater to the machine, cater to the problem.

---

<div class="post-metadata">

**Author:** ![pyj](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/pyj/32/5_2.png) [@pyj](https://forum.ada-lang.io/u/pyj)\
**Post date:** [October 6, 2026, 1:13pm UTC](https://forum.ada-lang.io/t/hi-guys-im-new-to-ada-any-advice/4801/5 "2026-10-06T13:13:16Z")

</div>

> [@OneWingedShark](#):
>
> _Use the type-system to describe your problem-space, then use **that** to solve your problem._

100% If it feels like you’re fighting the language, the language is probably telling you “this is the wrong direction, try another one.” It’s been right for me in this respect almost every time.

---

<div class="post-metadata">

**Author:** ![ValorZard](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/valorzard/32/623_2.png) [@ValorZard](https://forum.ada-lang.io/u/ValorZard)\
**Post date:** [October 7, 2026, 1:14am UTC](https://forum.ada-lang.io/t/hi-guys-im-new-to-ada-any-advice/4801/6 "2026-10-07T01:14:15Z")

</div>

Something that tripped me up is that if you want full SPARK verification, make sure your function bodies are also SPARK.

Otherwise spark can just ignore it and assume that you took care of it, which can lead to many suprises if your code actually breaks your contract when you run it for real.

---

<div class="post-metadata">

**Author:** ![Avila](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/avila/32/1100_2.png) [@Avila](https://forum.ada-lang.io/u/Avila)\
**Post date:** [October 7, 2026, 3:09am UTC](https://forum.ada-lang.io/t/hi-guys-im-new-to-ada-any-advice/4801/7 "2026-10-07T03:09:47Z")

</div>

Start by learning why data types can’t be mixed. For example:

`String` and `Character`, even though a string is an array of characters, you can’t mix them up.

````ada
```
S : String := "A";
L : Character := 'A';

if "A" = 'A' then
null;
end if;

````

because `L is a Standard.Character and S is a Standard.String.`

If you write programs that take user input, I don’t know this already, but I learned it the hard way: don’t use `Skip_Line` on what’s left in the buffer when using `Get_Line`.

For example [although it depends on how you take the input, but if you do it this way, be careful with this]:

```ada

procedure main ... etc.

S : String (1 .. 100) := (others => '0');
L : Natural range 0 .. S'length := 0;

Ada.text_IO.Get_Line(Item => S, Last => L);

```

If the user typed more than `S'length`, the extra text will remain floating in the buffer. Therefore, if you don’t clear the buffer with `Skip_Line`, it will stay there. Then, when you use `Ada.text_IO.Get_Line(Item => S, Last => L);` again, the first thing read will be what’s already in the buffer, which can lead to unexpected behavior.

I would recommend doing it like this:

```ada

S: String(1..101) := (others => '0'); -- 101 -> to have that extra value to know if there are any extra lines
L: Natural range 0.. S'length := 0;
Max: constant Positive := S'Length - 1;

```

and inside the begin block:

```ada

Ada.text_IO.Get_Line(Item => S, Last => L);
if L > Max then
Skip_Line;
end if;

```

This way, Ada clears the buffer. By “clear,” I mean that any floating data waiting for a line will no longer be there; it doesn’t clear RAM or anything like that.

So when you use `Get_Line` again, it’s already clean, with no more waiting data.

Not clearing the buffer further can affect you if you use this method in a loop with retries.

Learn about subtypes; it’s not difficult, but it helps a lot with future checks, especially if you’re using Spark.

Be careful with slices, not just string slices:

```ada
- 'First /= 1
- 'Last /= 'Length

```

Learn to separate `.ads and .adb`, and see how the visibility of what you use within them works.

This will help you understand what might raise an exception and where to separate certain code.

If you use Spark, it depends on your level. Remember that in regular Ada, you can say something and it won’t fail, but when working with Spark, you must know how to prove it by writing in a way that Spark can validate.

This includes loop invariants, `dynamic and static predicates`, etc.

Remember that working with verification in Spark is only effective if it doesn’t take any input from the user, or even if it doesn’t.

And if you have functions or precedence with unrestricted types, the opposite can be ideal: 100% verification with a proven. But if you compile without `Assertion_policy(chec) or -gnata`, those contracts disappear. So, even if it’s verified, without restricted types and without active flags, something unexpected could slip through and violate the contract, resulting in unexpected behavior.

well… Welcome to Ada! 👻

---

<div class="post-metadata">

**Author:** ![charlie5](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/charlie5/32/626_2.png) [@charlie5](https://forum.ada-lang.io/u/charlie5)\
**Post date:** [October 7, 2026, 6:51am UTC](https://forum.ada-lang.io/t/hi-guys-im-new-to-ada-any-advice/4801/8 "2026-10-07T06:51:56Z")

</div>

Read the Style Guides and Rationales for Ada 1983, 1995, 2005 and 2012. Unfortunately, there appears to be no version of these documents for Ada 2022. Both documents are quite easy reading and very helpful.

A decent book would also be helpful, of course. I believe Cohen and Barnes are quite good, tho I have not myself read them (yet). Others can probably give you better recommendations, as per books.

Finally, there is the [Awesome Ada](https://github.com/ohenley/awesome-ada) website, which gives a curated list of Ada resources. Oh, and there is also [Ada Wikibook](https://en.wikibooks.org/wiki/Ada_Programming).

You’re in for a treat 😃

Regards.

---

<div class="post-metadata">

**Author:** ![pmnw](https://forum.ada-lang.io/letter_avatar_proxy/v4/letter/p/c37758/32.png) [@pmnw](https://forum.ada-lang.io/u/pmnw)\
**Post date:** [October 7, 2026, 9:12am UTC](https://forum.ada-lang.io/t/hi-guys-im-new-to-ada-any-advice/4801/9 "2026-10-07T09:12:55Z")

</div>

1. Download Richard Riehle’s _Ada Distilled_ and read it as an introduction.
2. Be aware of the Ada Reference Manual, especially the library annexes [a], which you are likely to use extensively.
3. Ignore everything in the language and the library that’s prefixed with “Wide\_” or “Wide\_Wide\_” (assume it doesn’t exist).
4. Ada is a very good didactic language, and can be used to teach and learn all sorts of computer science subjecs such as data structures and algorithms, object-oriented programming, concurrency, real-time systems and even formal verification (with the SPARK language). For older books, which can usually be bought pre-owned cheaply, check the old Ada Home FAQ [b].

[a] [The Standard Libraries](https://ada-rapporteur-group.github.io/ARM/Ada_2022/RM-0-3.html)  
[b] [Ada FAQ: Learning the Language](https://www.adahome.com/FAQ/learning.html)

---

<div class="post-metadata">

**Author:** ![DirkCraeynest](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/dirkcraeynest/32/94_2.png) [@DirkCraeynest](https://forum.ada-lang.io/u/DirkCraeynest)\
**Post date:** [October 7, 2026, 11:11am UTC](https://forum.ada-lang.io/t/hi-guys-im-new-to-ada-any-advice/4801/10 "2026-10-07T11:11:26Z")

</div>

For Ada 2022 there indeed isn’t a Rationale, but there’s a smaller similar “Ada 2022 Overview” document by Jeff Coussins. See [Ada 2022 Documents - Ada Resource Association](https://www.adaic.org/ada-resources/standards/ada22/).

---

<div class="post-metadata">

**Author:** ![DirkCraeynest](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/dirkcraeynest/32/94_2.png) [@DirkCraeynest](https://forum.ada-lang.io/u/DirkCraeynest)\
**Post date:** [October 7, 2026, 11:17am UTC](https://forum.ada-lang.io/t/hi-guys-im-new-to-ada-any-advice/4801/11 "2026-10-07T11:17:47Z")

</div>

> [@pmnw](#):
>
> 1. For older books, which can usually be bought pre-owned cheaply, check the old Ada Home FAQ

Please do not refer to this hopelessly outdated and unmaintained website.

For learning material, including books, see the “Education” section of the Awesome Ada list, direct link: [GitHub - ohenley/awesome-ada: A curated list of awesome resources related to the Ada and SPARK programming language · GitHub](https://github.com/ohenley/awesome-ada#education) .

---

<div class="post-metadata">

**Author:** ![OneWingedShark](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/onewingedshark/32/305_2.png) [@OneWingedShark](https://forum.ada-lang.io/u/OneWingedShark)\
**Post date:** [October 7, 2026, 3:58pm UTC](https://forum.ada-lang.io/t/hi-guys-im-new-to-ada-any-advice/4801/12 "2026-10-07T15:58:25Z")

</div>

Please fix your formatting.  
For an inline code use one backtick (`'`'`), for a block of code use three (each set of backticks, in this case, should be on its own line).

---

<div class="post-metadata">

**Author:** ![Avila](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/avila/32/1100_2.png) [@Avila](https://forum.ada-lang.io/u/Avila)\
**Post date:** [October 7, 2026, 5:18pm UTC](https://forum.ada-lang.io/t/hi-guys-im-new-to-ada-any-advice/4801/13 "2026-10-07T17:18:01Z")

</div>

I will, thanks for letting me know! 👻👻

---

<div class="post-metadata">

**Author:** ![krischik](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/krischik/32/420_2.png) [@krischik](https://forum.ada-lang.io/u/krischik)\
**Post date:** [October 8, 2026, 7:03am UTC](https://forum.ada-lang.io/t/hi-guys-im-new-to-ada-any-advice/4801/14 "2026-10-08T07:03:34Z")

</div>

> [@pmnw](#):
>
> 1. Ignore everything in the language and the library that’s prefixed with “Wide\_” or “Wide\_Wide\_” (assume it doesn’t exist).

Speak for yourself. I had good success with those. Especially in the realm of text transformation.

---

<div class="post-metadata">

**Author:** ![dmitry-kazakov](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/dmitry-kazakov/32/522_2.png) [@dmitry-kazakov](https://forum.ada-lang.io/u/dmitry-kazakov)\
**Post date:** [October 8, 2026, 8:45am UTC](https://forum.ada-lang.io/t/hi-guys-im-new-to-ada-any-advice/4801/15 "2026-10-08T08:45:21Z")

</div>

> [@krischik](#):
>
> Especially in the realm of text transformation.

Texts should be processed not transformed. But even then “Wide\_Wide\_” stuff is not required. Algorithmically there is no advantage of having UCS-4 encoding. If you need random access to string code points, then you are probably doing something wrong.

But for a newcomer more important is to keep it understandable. String and character literals do not work as in other languages. Though Ada rules are perfectly consistent they conflict with de-facto standard UTF-8 and very notion Unicode, because they were drafted for handling multiple coding systems long before Unicode.

Understanding this in full and facing all insane consequences of related GNAT switches is too much to ask. While without “Wide\_” / “Wide\_Wide\_” everything works just like in other languages.

---

<div class="post-metadata">

**Author:** ![pmnw](https://forum.ada-lang.io/letter_avatar_proxy/v4/letter/p/c37758/32.png) [@pmnw](https://forum.ada-lang.io/u/pmnw)\
**Post date:** [October 8, 2026, 9:53am UTC](https://forum.ada-lang.io/t/hi-guys-im-new-to-ada-any-advice/4801/16 "2026-10-08T09:53:56Z")

</div>

This is an advice for a beginner and it’s a great and actionable advice.  
This thread is not about you.  
Do not derail from the OP with such pointless attacks.

---

<div class="post-metadata">

**Author:** ![krischik](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/krischik/32/420_2.png) [@krischik](https://forum.ada-lang.io/u/krischik)\
**Post date:** [October 8, 2026, 12:11pm UTC](https://forum.ada-lang.io/t/hi-guys-im-new-to-ada-any-advice/4801/17 "2026-10-08T12:11:53Z")

</div>

> [@dmitry-kazakov](#):
>
> Texts should be processed not transformed

Sometimes reading text is not enough. Sometimes you have the change text as well.

---

<div class="post-metadata">

**Author:** ![dmitry-kazakov](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/dmitry-kazakov/32/522_2.png) [@dmitry-kazakov](https://forum.ada-lang.io/u/dmitry-kazakov)\
**Post date:** [October 8, 2026, 1:30pm UTC](https://forum.ada-lang.io/t/hi-guys-im-new-to-ada-any-advice/4801/18 "2026-10-08T13:30:22Z")

</div>

> [@krischik](#):
>
> Sometimes reading text is not enough. Sometimes you have the change text as well.

Yes, but not in a way where random access to low-level representation were relevant. Basic search, matching, parsing, substitution algorithms are invariant between UTF-8 and UCS-4. Of course they work for you, but they would also work for UTF-8 without additional complexity of conversion from UTF-8 to UCS-4 and back with quirks of -gnat8 switch on top. All this might be no problem for an experienced Ada programmer, but for a beginner it an unnecessary source of frustration.

---

<div class="post-metadata">

**Author:** ![NumberSix](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/numbersix/32/195_2.png) [@NumberSix](https://forum.ada-lang.io/u/NumberSix)\
**Post date:** [October 8, 2026, 1:45pm UTC](https://forum.ada-lang.io/t/hi-guys-im-new-to-ada-any-advice/4801/19 "2026-10-08T13:45:35Z")

</div>

I couldn’t agree more, Dmitry. You couldn’t have said it better, without saying too much:)

---

<div class="post-metadata">

**Author:** ![krischik](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/krischik/32/420_2.png) [@krischik](https://forum.ada-lang.io/u/krischik)\
**Post date:** [October 9, 2026, 6:37am UTC](https://forum.ada-lang.io/t/hi-guys-im-new-to-ada-any-advice/4801/20 "2026-10-09T06:37:44Z")

</div>

> [@dmitry-kazakov](#):
>
> invariant between UTF-8 and UCS-4

```ada
Ada.Strings.Wide_Wide_Maps.To_Set ("ÄÖÜäöüß");
AdaCL.Wide_Wide_Strings.Regexp.Compile("[ÄÖÜäöüß]");
AdaCL.Wide_Wide_Strings.Spitbol.Patterns.Any ("ÄÖÜäöüß");

```

The complexity from conversion is minute when compared to the complexity from not having characters maps any more. The difference is so large that I put in the effort of developing a wide string regular expression and Spitbol pattern matcher.

[Next page](https://forum.ada-lang.io/t/hi-guys-im-new-to-ada-any-advice/4801.md?page=2)
