# LLM-friendliness as a metric: porting 20 languages with an LLM

**URL:** <https://forum.crystal-lang.org/t/llm-friendliness-as-a-metric-porting-20-languages-with-an-llm/8780>\
**Category:** Community\
**Created:** [March 13, 2026, 3:48pm UTC](https://forum.crystal-lang.org/t/llm-friendliness-as-a-metric-porting-20-languages-with-an-llm/8780 "2026-03-13T15:48:27Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![kostya](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/kostya/32/3228_2.png) [@kostya](https://forum.crystal-lang.org/u/kostya)\
**Post date:** [March 13, 2026, 3:48pm UTC](https://forum.crystal-lang.org/t/llm-friendliness-as-a-metric-porting-20-languages-with-an-llm/8780/1 "2026-03-13T15:48:27Z")

</div>

added article [LLM-friendliness as a metric: porting 20 languages with an LLM](https://kostya.github.io/LangArena/llm_friendliness.html) , spoiler crystal top1.

---

<div class="post-metadata">

**Author:** ![paulocoghi](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/paulocoghi/32/1429_2.png) [@paulocoghi](https://forum.crystal-lang.org/u/paulocoghi)\
**Post date:** [March 13, 2026, 5:58pm UTC](https://forum.crystal-lang.org/t/llm-friendliness-as-a-metric-porting-20-languages-with-an-llm/8780/2 "2026-03-13T17:58:21Z")

</div>

@kostya so much valuable information on your article. What a pleasant read! IMHO it deserves a post on its own here on the forum, to not be lost as an additional answer of an existing post.

---

<div class="post-metadata">

**Author:** ![kostya](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/kostya/32/3228_2.png) [@kostya](https://forum.crystal-lang.org/u/kostya)\
**Post date:** [March 13, 2026, 6:01pm UTC](https://forum.crystal-lang.org/t/llm-friendliness-as-a-metric-porting-20-languages-with-an-llm/8780/3 "2026-03-13T18:01:01Z")

</div>

Thanks, I tried to post on reddit, but they always ban me. People don’t like ai related content.

---

<div class="post-metadata">

**Author:** ![paulocoghi](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/paulocoghi/32/1429_2.png) [@paulocoghi](https://forum.crystal-lang.org/u/paulocoghi)\
**Post date:** [March 13, 2026, 6:06pm UTC](https://forum.crystal-lang.org/t/llm-friendliness-as-a-metric-porting-20-languages-with-an-llm/8780/4 "2026-03-13T18:06:32Z")

</div>

In this case, reddit is the one losing. Here, in the star constellation of the Cristal community, your excellent work has made this constellation shine brighter.

_I apologize because English is not my first language, and perhaps my expression here is not very good._

---

<div class="post-metadata">

**Author:** ![straight-shoota](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/straight-shoota/32/36_2.png) [@straight-shoota](https://forum.crystal-lang.org/u/straight-shoota)\
**Post date:** [March 13, 2026, 8:37pm UTC](https://forum.crystal-lang.org/t/llm-friendliness-as-a-metric-porting-20-languages-with-an-llm/8780/6 "2026-03-13T20:37:28Z")

</div>

I appreciate that Crystal comes out on top, but I have a couple of concerns with this analysis.

1. It’s very astonishing that Golang is ranked among the most expressive languages.  
It’s infamous for its verbosity. One of the most obvious features is the explicit error handling. But the comparison implementation doesn’t use much error handling at all.  
I see that as an indicator that this is not representative of general Golang code bases. And the same probably applies to all other language ports: They are only representative of code bases that primarily implement algorithms.
2. The introduction states that the original implementation was in Crystal (I presume written by hand?) and an LLM ported it to other language. So the result is not necessarily idiomatic or ideal code. It’s a common observation that LLMs produce bloated code of subpar quality. So unless actual developers familiar with the respective languages have reviewed the ported code bases, I don’t think it’s fair to consider them representative of the language. They’re representative of whatever the LLM generates for that language (possibly also influenced by the original Crystal implementation)
3. The size divided by gzipped size can serve as a heuristic for repetitive texts. But I have doubts how accurate it is as a metric for boilerplate in source code. Compression works only lexically. But source code has a lot of variability there. And there is no account of semantic boilerplate.
4. A big factor of the comparison is not just the expressiveness of a language, but also availability of libraries. A language with a big standard library or easily available optional dependencies, typically requires less custom code for implementing algorithms and such. Language ecosystems also have different cultures on build vs. buy (or implement vs. import) decisions.

---

<div class="post-metadata">

**Author:** ![kostya](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/kostya/32/3228_2.png) [@kostya](https://forum.crystal-lang.org/u/kostya)\
**Post date:** [March 13, 2026, 8:57pm UTC](https://forum.crystal-lang.org/t/llm-friendliness-as-a-metric-porting-20-languages-with-an-llm/8780/7 "2026-03-13T20:57:52Z")

</div>

1. Regarding Go, I found it surprising too, but the numbers show exactly that. Yes, the code doesn’t have many `if err != nil` — simply because the code is more about algorithms rather than real business logic where many subsystems return errors. Here it’s mostly math — get data, compute, get result. There aren’t many `if err != nil` cases. But this applies to all other languages as well.
2. This is addressed in the AI Critic section: ‘Topic 2: Lost in Translation?’
3. Yes, the metric is completely subjective — but I found that it aligns very well with relative comparisons. For example, Java and TypeScript are around zero — average languages, and the progression Java → Kotlin → Scala shows a clear trend.
4. Perhaps it’s not even the standard libraries, but rather the level of abstraction — the higher it is, the easier it is for an LLM to work with.

---

<div class="post-metadata">

**Author:** ![straight-shoota](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/straight-shoota/32/36_2.png) [@straight-shoota](https://forum.crystal-lang.org/u/straight-shoota)\
**Post date:** [March 13, 2026, 10:12pm UTC](https://forum.crystal-lang.org/t/llm-friendliness-as-a-metric-porting-20-languages-with-an-llm/8780/8 "2026-03-13T22:12:15Z")

</div>

> [@kostya](#):
>
> But this applies to all other languages as well.

Yes, but in different ways because different languages have vastly different approaches to error handling and propagation.  
And this applies to basically every other language feature that’s underrepresented in primarily math-focused algorithms.  
These different code bases only represent a subset of all language features.

> [@kostya](#):
>
> This is addressed in the AI Critic section: ‘Topic 2: Lost in Translation?’

Where do I find that?

---

<div class="post-metadata">

**Author:** ![kostya](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/kostya/32/3228_2.png) [@kostya](https://forum.crystal-lang.org/u/kostya)\
**Post date:** [March 13, 2026, 10:17pm UTC](https://forum.crystal-lang.org/t/llm-friendliness-as-a-metric-porting-20-languages-with-an-llm/8780/9 "2026-03-13T22:17:10Z")

</div>

> [@straight-shoota](#):
>
> Where do I find that?

[LangArena - Programming Languages Benchmark Comparison](https://kostya.github.io/LangArena/) , AI Critic tab.

---

<div class="post-metadata">

**Author:** ![zw963](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/zw963/32/1623_2.png) [@zw963](https://forum.crystal-lang.org/u/zw963)\
**Post date:** [March 14, 2026, 5:33am UTC](https://forum.crystal-lang.org/t/llm-friendliness-as-a-metric-porting-20-languages-with-an-llm/8780/10 "2026-03-14T05:33:50Z")

</div>

> [@straight-shoota](#):
>
> It’s very astonishing that Golang is ranked among the most expressive languages.

So surprised on this too. in my view, Go feels like a rather redundant language.

---

<div class="post-metadata">

**Author:** ![Fryguy](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/fryguy/32/1181_2.png) [@Fryguy](https://forum.crystal-lang.org/u/Fryguy)\
**Post date:** [March 21, 2026, 9:10pm UTC](https://forum.crystal-lang.org/t/llm-friendliness-as-a-metric-porting-20-languages-with-an-llm/8780/11 "2026-03-21T21:10:15Z")

</div>

This is pretty cool. However, I’m surprised you didn’t do Ruby, especially considering that it’s Crystal’s spiritual ancestor.

---

<div class="post-metadata">

**Author:** ![Fryguy](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/fryguy/32/1181_2.png) [@Fryguy](https://forum.crystal-lang.org/u/Fryguy)\
**Post date:** [March 21, 2026, 9:14pm UTC](https://forum.crystal-lang.org/t/llm-friendliness-as-a-metric-porting-20-languages-with-an-llm/8780/12 "2026-03-21T21:14:19Z")

</div>

Oh I just saw in the LangArena repo it says

> Languages like Python, Ruby, or PHP are intentionally excluded to maintain a focused comparison within a similar performance bracket.

but then, Python was in the repo anyway. 🤷

---

<div class="post-metadata">

**Author:** ![kostya](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/kostya/32/3228_2.png) [@kostya](https://forum.crystal-lang.org/u/kostya)\
**Post date:** [March 21, 2026, 10:21pm UTC](https://forum.crystal-lang.org/t/llm-friendliness-as-a-metric-porting-20-languages-with-an-llm/8780/13 "2026-03-21T22:21:18Z")

</div>

Python was added because it has a fast runtime — PyPy — which is ~6 times slower than C. If there’s something similar for Ruby, I can add it.

---

<div class="post-metadata">

**Author:** ![Fryguy](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/fryguy/32/1181_2.png) [@Fryguy](https://forum.crystal-lang.org/u/Fryguy)\
**Post date:** [March 22, 2026, 10:43pm UTC](https://forum.crystal-lang.org/t/llm-friendliness-as-a-metric-porting-20-languages-with-an-llm/8780/14 "2026-03-22T22:43:37Z")

</div>

Ah ok, that makes sense… I didn’t notice it was PyPy specifically.

I guess the closest thing on the Ruby side is CRuby with yjit enabled or JRuby/Truffleruby.
