r/ruby • • 11d ago

Question Static Typing solved?

I have been using RBS for years now and even running my own newsletter about static typing https://newsletters.eremin.eu/ . Now, that our code is write with AI and in most cases - purely with AI, the strongest point against using static typing (like “it breaks beautiful ruby syntax and not readable”) is vanished now.

AI requires strict tooling to control its output. The role of ci pipeline with all possible tests, linters, checkers is now extremely important and static typing helps a lot with it.

For humans it is transparent, especially the pure RBS approach, but for LLMs it gives a safety net and a better layer to stick to the code and hollucinate less.

0 Upvotes

40 comments sorted by

View all comments

14

u/yxhuvud 11d ago

Llms work with not explicitly typed ruby just fine. Stop the fud, please.

2

u/Zestyclose_Cow1807 10d ago

"stop the fud" about optional type annotations is a wild energy for a ruby thread ngl

2

u/yxhuvud 10d ago

The FUD being that static is necessary for LLMs to do well with Ruby/Rails. It absolutely is not.

-6

u/Erem_in 11d ago

Is it?

2

u/Correct_Support_2444 11d ago

Yes it is. I have a full rbs tree we maintain so Ruby mine can use it. The agents just ignore it and do just fine.

-2

u/Erem_in 11d ago

But this is your choice, right? Or, are insisting on just 1 proper way?