# Ada, the next Python-killer

**URL:** <https://forum.ada-lang.io/t/ada-the-next-python-killer/4187>\
**Category:** General\
**Tags:** fun\
**Created:** [February 12, 2026, 3:22pm UTC](https://forum.ada-lang.io/t/ada-the-next-python-killer/4187 "2026-02-12T15:22:26Z")\
**Posts on this page:** 20\
**Page:** 1

<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:** [February 12, 2026, 3:22pm UTC](https://forum.ada-lang.io/t/ada-the-next-python-killer/4187/1 "2026-02-12T15:22:26Z")

</div>

With list comprehensions like this, it may be game over for Python:

```ada
function Is_CRLF (C : Character) return Boolean is
  (C = Ada.Characters.Latin_1.CR or C = Ada.Characters.Latin_1.LF)
with Inline;

function Without_CRLF (Str : String) return String is
  ([for C of Str when not Is_CRLF (C) => C]);

```

---

<div class="post-metadata">

**Author:** ![Max](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/max/32/21_2.png) [@Max](https://forum.ada-lang.io/u/Max)\
**Post date:** [February 12, 2026, 3:29pm UTC](https://forum.ada-lang.io/t/ada-the-next-python-killer/4187/2 "2026-02-12T15:29:47Z")

</div>

> [@pmnw](#):
>
> `(C = Ada.Characters.Latin_1.CR or C = Ada.Characters.Latin_1.LF)`

Shorter:

C in Ada.Characters.Latin\_1.CR | Ada.Characters.Latin\_1.LF

---

<div class="post-metadata">

**Author:** ![Lucretia](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/lucretia/32/17_2.png) [@Lucretia](https://forum.ada-lang.io/u/Lucretia)\
**Post date:** [February 12, 2026, 3:46pm UTC](https://forum.ada-lang.io/t/ada-the-next-python-killer/4187/3 "2026-02-12T15:46:47Z")

</div>

Shorter:

```ada
package L1 renames Ada.Characters.Latin_1;
...
C in L1.CR | L1.LF

```

---

<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:** [February 12, 2026, 4:00pm UTC](https://forum.ada-lang.io/t/ada-the-next-python-killer/4187/4 "2026-02-12T16:00:12Z")

</div>

Except that it is CR LF vs LF. So the use case is that you need to test if the text at the current position is CR LF or LF and then advance the position by 2 or 1 characters correspondingly returning True or else return False.

The truth is:

- Constructed examples are to kill people who are brain dead already. 😀
- Production Ada code is no longer that Python code, provided same functionality and safety.
- Fancy functional stuff and cutting corners are harmful.

---

<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:** [February 12, 2026, 5:04pm UTC](https://forum.ada-lang.io/t/ada-the-next-python-killer/4187/5 "2026-02-12T17:04:27Z")

</div>

Python is used a lot of different ways. In addition to its straightforwardness, the ecosystem is what makes it great (matplotlib, numpy, pandas, pytorch, scikit, LangGraph).

I use python for cross-platform automation in place of shell or batch or powershell scripts. There is nothing else that even really comes close to the built-in libraries you get out of the box for building tools for this. I’ve seen Ruby used this way before and done experiments with F# scripts (and .NET Core libraries) so you call it a contender as well, but Python sort of stands alone.

I did show Anteforth to my local AI/Lean Startup this week and they were really impressed how you can write executable code that is provable (though not in the same sense as Lean). They were impressed by `Contract_Cases` (especially `'Old` in postconditions/result checks) and quantified expressions.

---

<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:** [February 12, 2026, 5:17pm UTC](https://forum.ada-lang.io/t/ada-the-next-python-killer/4187/6 "2026-02-12T17:17:52Z")

</div>

> [@dmitry-kazakov](#):
>
> Except that it is CR LF vs LF. So the use case is that you need to test if the text at the current position is CR LF or LF and then advance the position by 2 or 1 characters correspondingly returning True or else return False.

This I don’t understand, it’s just stripping a string off of characters with any of two matching character values.  
If you are criticizing the algorithm, you missed the point (and the post tag).

Please clarify, perhaps it’s me who is missing something.

Now, I don’t know if edge cases like these are safe:

```ada
Without_CRLF ("")
Without_CRLF ("" & Ada.Characters.Latin_1.LF)

```

Other than that, I see no reason why such constructs shouldn’t be used in production.

---

<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:** [February 12, 2026, 6:41pm UTC](https://forum.ada-lang.io/t/ada-the-next-python-killer/4187/7 "2026-02-12T18:41:13Z")

</div>

> [@pmnw](#):
>
> This I don’t understand, it’s just stripping a string off of characters with any of two matching character values.

If you mean trimming strings that is done differently.

> [@pmnw](#):
>
> If you are criticizing the algorithm, you missed the point (and the post tag).

Trimming uses a character set, and yes, if you want to trim delimiters then you need to use Unicode categorization for that.

> [@pmnw](#):
>
> Please clarify, perhaps it’s me who is missing something.

As I said. Anyway you turn it, it is a constructed example with no use case. E.g. when parsing some text source, then recognizing line ends is done differently. When trimming for whatever unlike reason it is a set and the test requires strings.

---

<div class="post-metadata">

**Author:** ![cantanima](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/cantanima/32/121_2.png) [@cantanima](https://forum.ada-lang.io/u/cantanima)\
**Post date:** [February 12, 2026, 6:52pm UTC](https://forum.ada-lang.io/t/ada-the-next-python-killer/4187/8 "2026-02-12T18:52:48Z")

</div>

Time to rename the language [Mongoose](https://en.wikipedia.org/wiki/Mongoose), I guess.

---

<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:** [February 12, 2026, 6:59pm UTC](https://forum.ada-lang.io/t/ada-the-next-python-killer/4187/9 "2026-02-12T18:59:21Z")

</div>

> [@dmitry-kazakov](#):
>
> it is a constructed example with no use case

It is not a constructed example, I lifted it straight from a standard library of another programming language.

I need to think about your words because my experience in this is limited and I just don’t know how to respond further.

---

<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:** [February 12, 2026, 7:04pm UTC](https://forum.ada-lang.io/t/ada-the-next-python-killer/4187/10 "2026-02-12T19:04:02Z")

</div>

> [@cantanima](#):
>
> Time to rename the language [Mongoose](https://en.wikipedia.org/wiki/Mongoose), I guess.

The Python logo [https://www.pngall.com/wp-content/uploads/2016/05/Python-Logo-PNG-Image.png](https://www.pngall.com/wp-content/uploads/2016/05/Python-Logo-PNG-Image.png) suggests some serious medical problem. Maybe [Scarab](https://en.wikipedia.org/wiki/Dung_beetle)? 😀

---

<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:** [February 12, 2026, 7:19pm UTC](https://forum.ada-lang.io/t/ada-the-next-python-killer/4187/11 "2026-02-12T19:19:34Z")

</div>

> [@pmnw](#):
>
> If you are criticizing the algorithm, you missed the point (and the post tag).

To be fair to @dmitry-kazakov, the post was pretty much two one-line code-snippets and a title; that’s awfully little to make as “the point” — granted, since I’m an intuitive type _ **and** _ a bit of a language nerd, I did get your point, which (as I understand it) is essentially:  
_Given the new constructions such as ‘list comprehensions’ (in addition to the already established pre-/post-conditions, type-invariants, and type-system), Ada is poised to be perhaps even more usable (in ‘smart-people’/non-programmer land) than Python._

> [@dmitry-kazakov](#):
>
> Except that it is CR LF vs LF. So the use case is that you need to test if the text at the current position is CR LF or LF and then advance the position by 2 or 1 characters correspondingly returning True or else return False.
> 
> The truth is:
> 
> - Constructed examples are to kill people who are brain dead already. 😀
> - Production Ada code is no longer that Python code, provided same functionality and safety.
> - Fancy functional stuff and cutting corners are harmful.

Yes the example given was very minimal, but you’re missing the forest for a specific leaf on a specific tree — the given functions strip out `CR` & `LF` from a given string and perhaps would have been better illustrated with `Whitespace`:

```ada
-- ASCII is 7-bits.
Subtype ASCII is Character Range Character'Val(0)..Character'Val(2#0111_1111#);
-- DEL (Character #127), and everything before Space are non-graphic characters.
Subtype Non_Graphic is ASCII 
  with Non_Graphic in Character'Val(0)..Character'Val( Natural'Pred(Character'Pos(' ')) ) | ASCII'Last;

function Without_Nongraphics (Str : String) return String is
  ([for C of Str when not in Non_Graphic => C]);

```

---

<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:** [February 12, 2026, 7:23pm UTC](https://forum.ada-lang.io/t/ada-the-next-python-killer/4187/12 "2026-02-12T19:23:18Z")

</div>

> [@OneWingedShark](#):
>
> To be fair to @dmitry-kazakov, the post was pretty much two one-line code-snippets and a title; that’s awfully little to make as “the point”

What surprised me was that a post tagged as “fun” proclaiming Ada as Python-killer would be taken as anything else than a “fun” joke.  
I will refrain from making such posts in the future.

Which doesn’t stop me from appreciating the concise capability iterator aggregates offer as your example only confirms.

---

<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:** [February 12, 2026, 7:25pm UTC](https://forum.ada-lang.io/t/ada-the-next-python-killer/4187/13 "2026-02-12T19:25:50Z")

</div>

> [@pmnw](#):
>
> What surprised me was that a post tagged as “fun” proclaiming Ada as Python-killer would be taken as anything else than a “fun” joke.  
> I will refrain from making such posts in the future.

Meh, don’t be put off by it.  
There’s a lot of different views of what “fun” is.

---

<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:** [February 12, 2026, 7:34pm UTC](https://forum.ada-lang.io/t/ada-the-next-python-killer/4187/14 "2026-02-12T19:34:50Z")

</div>

> [@OneWingedShark](#):
>
> perhaps would have been better illustrated with `Whitespace`:

Except that in real life you would match a _space separator_ (Zs) or tab: U+0009, U+0020, U+00A0, U+1680, U+2000 + etc. Thus either Wide\_Wide\_String or a specialized map that matches the longest key. Furthermore, a realistic case is that you would consider any sequence of blanks and comments to be whitespace. So you end up with rather complex thing that depends on what you parse.

It all boils down to the software decomposition paradigm, and my actual point is that _functional_ paradigm is **bad** for software design. It does not scale, it is inefficient, it is unreadable and unmaintainable.

---

<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:** [February 12, 2026, 7:39pm UTC](https://forum.ada-lang.io/t/ada-the-next-python-killer/4187/15 "2026-02-12T19:39:53Z")

</div>

Why do you think I limited my example to ASCII?  
Obviously to bypass that as irrelevant to the example, **but** if you want something that _is_ Unicode, _Byron_’s [definition for `Identifier`](https://github.com/OneWingedShark/Byron/blob/18305e400be9a31d1b1e55a6da4d984c6a8926df/src/internals/spark/byron-internals-spark-pure_types.ads) uses the Unicode classifications, perfectly conforming to the LRM’s definition.

---

<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:** [February 12, 2026, 7:44pm UTC](https://forum.ada-lang.io/t/ada-the-next-python-killer/4187/16 "2026-02-12T19:44:28Z")

</div>

> [@OneWingedShark](#):
>
> Why do you think I limited my example to ASCII?

Because it was written for ASCII.

---

<div class="post-metadata">

**Author:** ![cantanima](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/cantanima/32/121_2.png) [@cantanima](https://forum.ada-lang.io/u/cantanima)\
**Post date:** [February 12, 2026, 8:31pm UTC](https://forum.ada-lang.io/t/ada-the-next-python-killer/4187/17 "2026-02-12T20:31:47Z")

</div>

> [@pmnw](#):
>
> What surprised me was that a post tagged as “fun” proclaiming Ada as Python-killer would be taken as anything else than a “fun” joke.

FWIW I didn’t notice the tags and thought you were serious at first. I don’t remember how it was I realized you weren’t entirely serious. An emoji wink might have helped.

But, I am a bit slower than molasses in winter, so maybe I’m missing a larger joke. And I got it eventually, and tried to play along, so 🤷

---

<div class="post-metadata">

**Author:** ![F-Loyer](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/f-loyer/32/531_2.png) [@F-Loyer](https://forum.ada-lang.io/u/F-Loyer)\
**Post date:** [February 12, 2026, 9:34pm UTC](https://forum.ada-lang.io/t/ada-the-next-python-killer/4187/18 "2026-02-12T21:34:58Z")

</div>

I disagree about the functional paradigm.

In a little program, I have written

```ada
let () = 
   In_channel.read_lines source_filename
   |> List.map ~f:line_to_inst
   |> List.group ~break:(fun a b -> String.(a.cat<>b.cat))
   |> fun list -> Out_channel.with_file ~f:(write_xml list) dest_filename

```

The first line read the file (returning a list of line), the second parse each line (`line_to_inst` is the parser which convert a single line to a record), the 3rd convert the list of record to a list of list of record, grouping the list about a criteria, the same category (`cat` field), then writing an XML file.

The presentation is familiar to any Unix shell script writter (`gen_file | grep xxx | sort | gzip > a.gz`)

In a typical procedural paradigm, I guess I would open the file, start a big loop. In this loop: read a line, parse it, do someting if it is from a different category than the privious… Most aspect would be entangled. Sure, it would be more scalable than my program, but my use case doesn’t need myriads of lines to be read.

And many functionnal languages can use a procedural approach when needed (generating an HTML file with a Buffer object (`StringBuilder`in Java) is typically a procedural paradigm application). The idea is to use the best paradigm depending of the constraints.

Here, you note multiple function parameters (each preceded by `~f`, the `with_file` deals with opening, closing… even in case of exception. This can make the code safer. Python has a similar thing (`with open(…) as file:`)

---

<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:** [February 13, 2026, 8:35am UTC](https://forum.ada-lang.io/t/ada-the-next-python-killer/4187/19 "2026-02-13T08:35:11Z")

</div>

I understand why like this OCaml code.  
At the same time, it is a hard sell, especially on this forum.

I can’t stop laughing that I made this thread as a joke and it devolved into this discussion.  
All the more so given that the original isn’t even a functional pattern, it is a loop over a collection that uses Ada’s aggregate.

---

<div class="post-metadata">

**Author:** ![JC001](https://forum.ada-lang.io/letter_avatar_proxy/v4/letter/j/e56c9b/32.png) [@JC001](https://forum.ada-lang.io/u/JC001)\
**Post date:** [February 13, 2026, 10:49am UTC](https://forum.ada-lang.io/t/ada-the-next-python-killer/4187/20 "2026-02-13T10:49:33Z")

</div>

```ada
function Without_CRLF (Source : in String) return String is
   (if Source = "" then ""
    else
       (if Source (Source'First) in Ada.Characters.Latin_1.CR | Ada.Characters.Latin_1.LF
        then "" else Source (Source'First) & "") &
       Without_CRLF (Source (Source'First + 1 .. Source'Last) ) );

```

[Next page](https://forum.ada-lang.io/t/ada-the-next-python-killer/4187.md?page=2)
