Skip to content

Direct execution of .trb #26

Description

@pvcresin

I find the T-Ruby syntax appealing because types are incorporated into the grammar.

On the other hand, by writing RBS comments in .rb files,

  • type checking (by Sorbet, Steep or TypeProf)
  • RBS file generation (by rbs-inline)
  • direct execution

can all be achieved.

# a.rb
class A
  #: (Integer) -> String
  def foo(x)
    x.to_s
  end
end

While projects like ruby-next exist, transpilation is not yet as common in the Ruby community compared to the JavaScript community, so I thought T-Ruby might not be widely used.

Therefore, I thought that if T-Ruby could be directly executed, it could be said to have equivalent functionality to raw Ruby files with RBS comments written in them.

Activity

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions