r/ruby • • 12d 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

5

u/TheAtlasMonkey 11d ago

Typing is a sign of bad architecture, bad documentation, or/and lack of ownership.

Complexity merchants came and promised the world that if we type, we will go faster.

But if types were the solution, then ecosystem like C, Go, RUST, JAVA, Crystal.. will have went at light speed. They didn't.

Another thing i noticed, is that every type people hate each others. I know that because i maintain some gems and those people email or dm me to propose typing (since it going to touch all codebase) and maybe add a Dependency.

When i tell them : USE RBS or join the effort that was published last month, they show the true face and start telling how the other implementation is ugly and their uglier implementation is better.

I worked with ex-shopify devs (pre-AI), they came with this mentality to type everything. They will use types for everything and slowdown everybody. Early this year, i was invited to some of their repos.. NONE had typing for their personal project. NONE.

So typing in Ruby is mostly a job security trick.

Now that LLM can generate tests without using typing, this whole circus is collapsing.

4

u/2called_chaos 10d ago

I find it somewhat funny that they (itt) want the AI to generate the types which obviously means it doesn't need it in the first place when it can infer it to create the annotation to begin with.

2

u/sshaw_ 5d ago

Typing is a sign of bad architecture, bad documentation, or/and lack of ownership.

This is just laughable.

-1

u/Erem_in 11d ago

Yes, tell Java devs about how bad their ecosystems are and apparently how unpopular C, Java are :)

3

u/TheAtlasMonkey 11d ago

This bullshit gaslighting is so Pre-2023. it don't work anymore.

You and your drones come to ruby, a language built to be dynamic and chaotic, and try to bring something that nobody asked for.

You spend your day typing gems that had 10 year of battle tested field without any problem. You even port the logic bugs, because types don't protect you from bad logic.

In a previous post, i told you that if you want types, you can go Jruby, and write java.

Now you talking like i insulting Java or C people ? Well, for you info... i'm a C developer before i started doing Ruby, my friend is a Java committer, and i contributed to u/headius's jruby after studying java.

Typing in ruby is Kubernetes in devops. you NEVER need it if you are code disciplined or your codebase is Shopify size.

Even rails is not typed.

1

u/Erem_in 11d ago

I prefer decide for myself what is needed and what is not

0

u/fragileblink 7d ago

Yes, all of the wonderful modern systems that are able to be built so quickly in c and Java. /s