# My 2022 Crystal Wishlist

**URL:** <https://forum.crystal-lang.org/t/my-2022-crystal-wishlist/4186>\
**Category:** Community\
**Created:** [December 25, 2021, 9:34pm UTC](https://forum.crystal-lang.org/t/my-2022-crystal-wishlist/4186 "2021-12-25T21:34:57Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jzakiya](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/jzakiya/32/278_2.png) [@jzakiya](https://forum.crystal-lang.org/u/jzakiya)\
**Post date:** [December 25, 2021, 9:34pm UTC](https://forum.crystal-lang.org/t/my-2022-crystal-wishlist/4186/1 "2021-12-25T21:34:57Z")

</div>

It has been a momentous 2021 for `Crystal`.

**Version 1.0** was released in March 2021

> **[Crystal 1.0 - What to expect](https://crystal-lang.org/2021/03/22/crystal-1.0-what-to-expect.html)**
>
> The release of the first major release of Crystal arrives after many years of hard work. With thousands of contributions from people worldwide, it was finally possible to find consensus for what truly mattered for 1.0 and what could wait for future...

followed by the first (virtual) **Crystal Conference** in July 2021.

> **[Crystal 1.0 Conference](https://crystal-lang.org/conference/)**
>
> July 8th 2021, 12:30pm - 9:30pm UTC

In the spirit of the Holiday Season,

Here’s my **2022 Crystal Wish List** , in no particular order.

1. **At least one more full time (paid) Dev**

Adding @straight-shoota as a fulltime dev greatly speeded up `Crystal` development, and improvement. More fulltime devs will enable more aspects of the language to be focused on simultaneously. More devs means the need for more $$$ to pay them. Hopefully that will happen.

1. **Faster|Incremental Compiling**

Compiling speed seems to be always raised by people coming from other languages. It’s a known issue, if for no other reason than marketing.

1. **Better Multi-threading**

`Crystal` has a very young multi-threading model|implementation primarily based on fibers, which is geared more for concurrency than parallelism.

I would love to see it become as good as `Rust` for true parallel processing. `Rust` has the crate `Rayon` that provides most of that for applications. I would love for `Crystal` to provide comparable features and utility.

> **[GitHub - rayon-rs/rayon: Rayon: A data parallelism library for Rust](https://github.com/rayon-rs/rayon)**
>
> Rayon: A data parallelism library for Rust. Contribute to rayon-rs/rayon development by creating an account on GitHub.

1. **Smaller Binaries**

I consistently see this raised in the `Rust` forums too.

1. **More|Better Documentation**

You never can have enough (good) documentation, especially as the language and features are growing|changing. This has been brought up over and over, so it’s nothing new as a desirable element of the `Crystal` ecosystem.

I also suggest creating a **Crystal Youtube Channel** as a single focal point for people to see|submit video tutorials, examples, project showcases, etc.

1. **Marketing Strategy**

You can have the best `xyz`, but if nobody knows about it, or how to use it, and how it can make their lives easier, better, more productive, it doesn’t matter.

This directly ties into the documentation issue too.

1. **Another Crystal Conference**

The July conference was great! Thanks to everyone involved in pulling it off. Of course the `Ruby` world has lots of conferences around the world which its community look forward to. This also fits into marketing and general education.

1. **Google Summer of Code (GSoC)**

I’ve seen this discussed before. Maybe it can be done in 2022.

1. **Web Assembly (WASM)**

It’s emerging, it’s sexy, it’s useful, it’s part of the future.  
`Crystal` can (should) be a big player in this field.

1. **Killer App**

When you’re good at everything, people overlook you. When you’re known for at least one thing, more people pay attention. It just seems that’s the way it is. Allot of people still don’t know there’s a difference|separation between `Rails` and `Ruby`.

This is my short list. What’s yours!

---

<div class="post-metadata">

**Author:** ![Bonarc](https://avatars.discourse-cdn.com/v4/letter/b/7ab992/32.png) [@Bonarc](https://forum.crystal-lang.org/u/Bonarc)\
**Post date:** [December 27, 2021, 10:56am UTC](https://forum.crystal-lang.org/t/my-2022-crystal-wishlist/4186/2 "2021-12-27T10:56:46Z")

</div>

Well, in order of most wanted

1. **Full windows support**  
and I can guarantee the project will get more funding once it is available on windows
2. **Better documentation**  
Just like you said. Personally I prefer written items over videos but a better youtube presence wouldn’t hurt. One thing that that is clearly improvable is to write documentation that does not rely on users knowing ruby at all, and likewise, to expect non-ruby users.
3. **Faster or more tuneable compilation**  
once again like you said

---

<div class="post-metadata">

**Author:** ![postmodern](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/postmodern/32/902_2.png) [@postmodern](https://forum.crystal-lang.org/u/postmodern)\
**Post date:** [December 29, 2021, 12:46am UTC](https://forum.crystal-lang.org/t/my-2022-crystal-wishlist/4186/3 "2021-12-29T00:46:53Z")

</div>

RE **Documentation** : has anyone thought of creating something like [rubydoc.info](https://rubydoc.info/) to auto-build/cache the `crystal doc`s for shards given their github/gitlab user/repo name? That way the shard authors wouldn’t have to host their own documentation and it would all be in one place.

---

<div class="post-metadata">

**Author:** ![Blacksmoke16](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/blacksmoke16/32/1241_2.png) [@Blacksmoke16](https://forum.crystal-lang.org/u/Blacksmoke16)\
**Post date:** [December 29, 2021, 1:24am UTC](https://forum.crystal-lang.org/t/my-2022-crystal-wishlist/4186/4 "2021-12-29T01:24:44Z")

</div>

Can just use [https://pages.github.com/](https://pages.github.com/) with a GH Action, e.g. [oq/deployment.yml at master · Blacksmoke16/oq · GitHub](https://github.com/Blacksmoke16/oq/blob/master/.github/workflows/deployment.yml#L51-L64).

---

<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:** [December 29, 2021, 2:37pm UTC](https://forum.crystal-lang.org/t/my-2022-crystal-wishlist/4186/5 "2021-12-29T14:37:23Z")

</div>

> [@Hosted documentation site](https://forum.crystal-lang.org/t/hosted-documentation-site/1896):
>
> Some languages have hosted sites that help you find packages that you need. Rust has docs.rs, which has docs on all the packages that are uploaded to [crates.io](http://crates.io) Go has pkg.go.dev, which crawls dependency trees of the code it knows about, to find and generate documentation for the code it finds Elm has [package.elm-lang.org](http://package.elm-lang.org) which hosts READMEs of each package Typescript has the Typescript types search, which has links to libraries that has associated type definitions The shards site is a great …

---

<div class="post-metadata">

**Author:** ![wontruefree](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/wontruefree/32/1467_2.png) [@wontruefree](https://forum.crystal-lang.org/u/wontruefree)\
**Post date:** [December 30, 2021, 6:46pm UTC](https://forum.crystal-lang.org/t/my-2022-crystal-wishlist/4186/6 "2021-12-30T18:46:09Z")

</div>

Integrations with popular 3rd party services. So much of modern development is integrating with other applications in the ecosystem.

---

<div class="post-metadata">

**Author:** ![mavu](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/mavu/32/213_2.png) [@mavu](https://forum.crystal-lang.org/u/mavu)\
**Post date:** [December 31, 2021, 12:03am UTC](https://forum.crystal-lang.org/t/my-2022-crystal-wishlist/4186/7 "2021-12-31T00:03:53Z")

</div>

(in my opinion) the reason why ruby didn’t become what python now is, is sinple windows support and easy gui toolkits. So, thats my number 1 wish.

---

<div class="post-metadata">

**Author:** ![HertzDevil](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/hertzdevil/32/1023_2.png) [@HertzDevil](https://forum.crystal-lang.org/u/HertzDevil)\
**Post date:** [January 2, 2022, 5:31am UTC](https://forum.crystal-lang.org/t/my-2022-crystal-wishlist/4186/8 "2022-01-02T05:31:58Z")

</div>

My only wish in 2022 is for the type system and some core semantics to be formalized and finalized, so that the compiler can be developed against a truly formal specification and compiler non-developers don’t have to guess what happens behind the scenes (in cases like [this](https://github.com/crystal-lang/crystal/issues/10231) for example).

---

<div class="post-metadata">

**Author:** ![nico](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/nico/32/692_2.png) [@nico](https://forum.crystal-lang.org/u/nico)\
**Post date:** [January 3, 2022, 9:10am UTC](https://forum.crystal-lang.org/t/my-2022-crystal-wishlist/4186/9 "2022-01-03T09:10:30Z")

</div>

Happy new year!

My only wish for Crystal in 2022 is a better compilation time.

Bonus:

- Better support of Crystal in VScode
- Better documentation
- WASM

---

<div class="post-metadata">

**Author:** ![beta-ziliani](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/beta-ziliani/32/1821_2.png) [@beta-ziliani](https://forum.crystal-lang.org/u/beta-ziliani)\
**Post date:** [January 3, 2022, 2:16pm UTC](https://forum.crystal-lang.org/t/my-2022-crystal-wishlist/4186/10 "2022-01-03T14:16:06Z")

</div>

I can’t agree more, but that’s a wish for 2022-2026 (the time span of a PhD…).

---

<div class="post-metadata">

**Author:** ![matthewmcgarvey](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/matthewmcgarvey/32/983_2.png) [@matthewmcgarvey](https://forum.crystal-lang.org/u/matthewmcgarvey)\
**Post date:** [January 3, 2022, 2:24pm UTC](https://forum.crystal-lang.org/t/my-2022-crystal-wishlist/4186/11 "2022-01-03T14:24:16Z")

</div>

We have a similar list going in Lucky. [My Lucky "Wishlist" · Discussion #1629 · luckyframework/lucky · GitHub](https://github.com/luckyframework/lucky/discussions/1629)

Personally, I want to see more experimentation done with DSLs specifically in the web sphere. Most of what has been written was written by people coming from Ruby and mimicking libraries there, but I think there’s so much left unexplored. Athena is a good example where it’s using Crystal’s annotations in a really clean way that no other popular framework has done and that’s because the creator was inspired by PHP rather than Ruby. I think Kotlin is a source of inspiration for me even though I have used it very little. I’m looking at libraries like [GitHub - JetBrains/Exposed: Kotlin SQL Framework](https://github.com/JetBrains/Exposed) and wondering if it’s do-able in Crystal.

---

<div class="post-metadata">

**Author:** ![Blacksmoke16](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/blacksmoke16/32/1241_2.png) [@Blacksmoke16](https://forum.crystal-lang.org/u/Blacksmoke16)\
**Post date:** [January 3, 2022, 2:51pm UTC](https://forum.crystal-lang.org/t/my-2022-crystal-wishlist/4186/12 "2022-01-03T14:51:42Z")

</div>

As you could probably guess, I’d like some improvements/thoughts around macros/annotations:

- [[RFC] Annotations 2.0 · Issue #9802 · crystal-lang/crystal · GitHub](https://github.com/crystal-lang/crystal/issues/9802)
- [[RFC] Macro Defs - Methods in Macro land · Issue #8835 · crystal-lang/crystal · GitHub](https://github.com/crystal-lang/crystal/issues/8835)
- [Add `ASTNode.warning` macro method · Issue #9246 · crystal-lang/crystal · GitHub](https://github.com/crystal-lang/crystal/issues/9246)
- [Specify annotation targets · Issue #8148 · crystal-lang/crystal · GitHub](https://github.com/crystal-lang/crystal/issues/8148)
- [Macro raise doesn't keep location · Issue #7147 · crystal-lang/crystal · GitHub](https://github.com/crystal-lang/crystal/issues/7147)
- [Keep type location when raising inside macro hooks · Issue #7394 · crystal-lang/crystal · GitHub](https://github.com/crystal-lang/crystal/issues/7394)

Having all these would be huge in regards to the power, ease of use, and readability of macros/annotations.

---

<div class="post-metadata">

**Author:** ![asterite](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/asterite/32/60_2.png) [@asterite](https://forum.crystal-lang.org/u/asterite)\
**Post date:** [January 4, 2022, 12:05pm UTC](https://forum.crystal-lang.org/t/my-2022-crystal-wishlist/4186/13 "2022-01-04T12:05:33Z")

</div>

The only thing in my wishlist is to think about Crystal 2.0 as a new language that retains the original spirit of the language but changes enough things to be able to implement modular compilation. I have to sit down and think about what this means, and my wish is for other core team members to also try to think about that.

To achieve modular compilation, all of these would need to happen:

- Instead of `require` merely loading files, change it, or introduce an `import` keyword to specify what you want to import. If you don’t import something, it’s not globally available (unlike the current behavior)
- Mandatory types in method arguments and return types
- Disallow reopening types, but allow something similar by having extension methods (similar to C#)
- Type restrictions in generic type arguments
- Macros can no longer introspect the entire program. They can still introspect types

At least, the idea is that a file can be looked at and type-checked by looking at itself and its dependencies, but without having to always have a main program.

That said, I’m not sure if all of the above is entirely possible without making the language lose its essence.

---

<div class="post-metadata">

**Author:** ![beta-ziliani](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/beta-ziliani/32/1821_2.png) [@beta-ziliani](https://forum.crystal-lang.org/u/beta-ziliani)\
**Post date:** [January 4, 2022, 8:47pm UTC](https://forum.crystal-lang.org/t/my-2022-crystal-wishlist/4186/14 "2022-01-04T20:47:00Z")

</div>

In the original list there is a Crystal Workshop 2022, and I’ve been thinking about adding spaces to discuss these kind of topics.

---

<div class="post-metadata">

**Author:** ![Didactic.Drunk](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@Didactic.Drunk](https://forum.crystal-lang.org/u/Didactic.Drunk)\
**Post date:** [March 10, 2022, 8:30am UTC](https://forum.crystal-lang.org/t/my-2022-crystal-wishlist/4186/15 "2022-03-10T08:30:27Z")

</div>

> [@asterite](#):
>
> - Mandatory types in method arguments and return types
> - Disallow reopening types, but allow something similar by having extension methods (similar to C#)
> - Type restrictions in generic type arguments
> - Macros can no longer introspect the entire program. They can still introspect type

Did you just say “be like many other languages” and “remove some of the main reasons people use crystal”?

### Nitpicking `import` - my least objectionable change

Working in C# requires sprinkling ~2-5 additional `usings` in most files. I don’t see how this helps me as a programmer other than resolving namespace collisions (which shouldn’t happen).

`using/import` only says which modules/classes a file uses. Which can be gathered by parsing the file and made efficient by caching the result. ← Correct me if I’m wrong.

Sooooo what real benefit did import provide other than repetitive strain injury at the top of every file?

Tone: My critique isn’t directed at you personally but at `import` and extra work in general.

All others on your wishlist make the top of my wish not list, except for macros which I don’t know enough about.

---

<div class="post-metadata">

**Author:** ![Didactic.Drunk](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@Didactic.Drunk](https://forum.crystal-lang.org/u/Didactic.Drunk)\
**Post date:** [March 10, 2022, 9:07am UTC](https://forum.crystal-lang.org/t/my-2022-crystal-wishlist/4186/16 "2022-03-10T09:07:29Z")

</div>

> [@jzakiya](#):
>
> `Crystal` has a very young multi-threading model|implementation primarily based on fibers, which is geared more for concurrency than parallelism.
> 
> `Rust` has the crate `Rayon` that provides most of that for applications. I would love for `Crystal` to provide comparable features and utility.

You could try concurrent.cr (self plug), which is similar to rayon

> **[GitHub - didactic-drunk/concurrent.cr: Modern concurrency tools for Crystal](https://github.com/didactic-drunk/concurrent.cr)**
>
> Modern concurrency tools for Crystal. Contribute to didactic-drunk/concurrent.cr development by creating an account on GitHub.

Example:

```crystal
array.parallel.select { ... }.map { ... }.serial.sum

```

Or more complicated:

```crystal
uris.parallel.map(fibers: 50) { |uri|
  # at most 50 parallel http requests
  http_get(uri)
}.map(fibers: 10) { |data|
  # at most 10 parallel db requests performing lookups or other validation
  A::ORM.new(data)
}.batch(1000) { |batch|
  # Back to a single fiber
  # Save 1000 records in a single transaction
  A::ORM.transaction do
    batch.each &.save!
  end
}.wait

```

It’s a little more (and less?) than rayon and includes parallel channel processing.

Order is not preserved.

Compile with `-Dpreview_mt` and the fibers run on multiple threads.

---

<div class="post-metadata">

**Author:** ![asterite](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/asterite/32/60_2.png) [@asterite](https://forum.crystal-lang.org/u/asterite)\
**Post date:** [March 10, 2022, 12:21pm UTC](https://forum.crystal-lang.org/t/my-2022-crystal-wishlist/4186/17 "2022-03-10T12:21:10Z")

</div>

> [@Didactic.Drunk](#):
>
> Did you just say “be like many other languages” and “remove some of the main reasons people use crystal”?

Yeah, that’s a good point 😅

I always have this conflict… like, I really like all the nice features Crystal has, but they make doing modular or incremental compilation impossible. So Crystal use cases are limited to small and medium projects. Large projects will take an awful amount of time to compile, and there’s nothing you can do about that. And I’m not sure that’s good.

That said, when Ruby started more than 20 years ago, apparently it was pretty slow. Then machines became faster and now the performance is pretty good. And I heard the new Mac M1 compiles Crystal code like 5 times faster than the old Mac, so maybe in the future compile times won’t be a problem anymore. No idea!

> [@Didactic.Drunk](#):
>
> `using/import` only says which modules/classes a file uses. Which can be gathered by parsing the file and made efficient by caching the result. ← Correct me if I’m wrong.

Well, `using/import` tells the programmer which file they need to look in case they don’t understand what `Foo` refers to. It limits the search scope. It also tells the compiler a file’s dependencies, so if any dependency changes, it can know which other files need to be recompiled. With Crystal’s `require` or Ruby’s `require` that’s pretty much impossible.

Without having an import system, incremental or modular compilation is impossible to do.

---

<div class="post-metadata">

**Author:** ![mavu](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/mavu/32/213_2.png) [@mavu](https://forum.crystal-lang.org/u/mavu)\
**Post date:** [March 11, 2022, 7:41am UTC](https://forum.crystal-lang.org/t/my-2022-crystal-wishlist/4186/18 "2022-03-11T07:41:07Z")

</div>

> [@asterite](#):
>
> I always have this conflict… like, I really like all the nice features Crystal has, but they make doing modular or incremental compilation impossible. So Crystal use cases are limited to small and medium projects. Large projects will take an awful amount of time to compile, and there’s nothing you can do about that. And I’m not sure that’s good.

Please don’t sacrifice type inference for compile speed. Yes, it takes a bit. but so does building a chair. compared to the time you spend sitting on it, a bit of extra time in manufacturing pales in comparison.

There really is a lot of crying about the compile speed, but please stop a moment and consider if that is maybe a small price to pay for what crystal brings to the table.

---

<div class="post-metadata">

**Author:** ![npn](https://avatars.discourse-cdn.com/v4/letter/n/e68b1a/32.png) [@npn](https://forum.crystal-lang.org/u/npn)\
**Post date:** [March 11, 2022, 11:00am UTC](https://forum.crystal-lang.org/t/my-2022-crystal-wishlist/4186/19 "2022-03-11T11:00:07Z")

</div>

it is a huge price to pay for me actually.

The more code you add to the project, the more it hurts you back by the compilation time.

the feedback loop becomes longer and longer, and the productivity just drops significantly.

also, the current crystal is way too lax it’s hard to trace the side effects.

---

<div class="post-metadata">

**Author:** ![Didactic.Drunk](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@Didactic.Drunk](https://forum.crystal-lang.org/u/Didactic.Drunk)\
**Post date:** [March 11, 2022, 5:21pm UTC](https://forum.crystal-lang.org/t/my-2022-crystal-wishlist/4186/20 "2022-03-11T17:21:15Z")

</div>

> [@asterite](#):
>
> Well, `using/import` tells the programmer which file they need to look in case they don’t understand what `Foo` refers to. It limits the search scope. It also tells the compiler a file’s dependencies, so if any dependency changes, it can know which other files need to be recompiled. With Crystal’s `require` or Ruby’s `require` that’s pretty much impossible.
> 
> Without having an import system, incremental or modular compilation is impossible to do.

I’m not sure that’s 100% true.

Rather than have a goal of 100% incremental compilation, use a goal of faster compilation times utilizing incremental compilation when possible or easy.

How could this be done?

```auto
Foreach function
  does this function only call primitive operations? Y: precompile
  does this function only call methods that are precompilable? Y: precompile

  cache:
    precompiled status
    precompiled blob
    source or ast of nonprecompiled portion
    list of files defining this method/class and macros used

```

Solving reopening classes:

```auto
On compiler start:
  Scan search paths for new/deleted/modified files
    foreach file
      Invalidate caches for classes/methods modified

```

Solving lack of import

```auto
The compiler maintains a list of file dependencies foreach class/method
When parsing a file, every namespace referenced is equivalent to an import statement
When the file changes:
  reparse and invalidate all referenced precompiled methods/classes recursively
  recompute the implied imports

```

Now the problems are:

1. Maintaining/invaliding the various caches
2. Compiling the remaining parts that can’t be precompiled
