Skip to content

WIP: Braceless Ruby#31

Open
marcusdots wants to merge 2 commits intoOpenVoxProject:mainfrom
marcusdots:braceless
Open

WIP: Braceless Ruby#31
marcusdots wants to merge 2 commits intoOpenVoxProject:mainfrom
marcusdots:braceless

Conversation

@marcusdots
Copy link
Copy Markdown

@marcusdots marcusdots commented Apr 1, 2026

Short description

It is unsafe to use braces as it confuses programmers of non LISP dialects. See for instance
https://github.com/OpenVoxProject/openvox-server/blob/main/src/clj/puppetlabs/services/ca/certificate_authority_core.clj#L150

          (rr/status ((response :outcome) outcomes->codes))))))

Ruby has the ability to be used without braces, parentheses and brackets. For safety reasons we should adopt this new coding style.

@nmburgan
Copy link
Copy Markdown
Member

nmburgan commented Apr 1, 2026

I’m not sure I agree with this. What we have is standard Ruby syntax, and I’m not sure it’s useful to make a bunch of changes like this to satisfy people who aren’t Ruby developers, and we introduce risk by the large refactor this would require.

@jay7x
Copy link
Copy Markdown

jay7x commented Apr 1, 2026

I'd say we should have this defined in our style guide.
UPD: To clarify, I personally don't like to enforce braceless style. I see no problems with foo() syntax. I see no intersections here with Clojure, as those two are very different languages. So this cannot be a reason to enforce dropping braces. Also, there are cases, when braces are required to prevent parser and reader confusion.

Copy link
Copy Markdown

@binford2k binford2k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clearly we'll need some updated rubocop configuration for this to pass lint checks

@marcusdots
Copy link
Copy Markdown
Author

@nmburgan @jay7x @binford2k Happy Aprils Fools day! :-)

This code is syntactically correct Ruby-3 and passes ruby -c.
And to be honest, I despise the monster I have created.

@nmburgan
Copy link
Copy Markdown
Member

nmburgan commented Apr 1, 2026

Ahhhhhhhhh, you got me!!!! Well done @marcusdots !

@nmburgan
Copy link
Copy Markdown
Member

nmburgan commented Apr 1, 2026

The fact it’s an april fools joke kinda makes me want to merge it now. You convinced me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants