New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Another similar library #17

Open
egonSchiele opened this Issue Apr 9, 2015 · 4 comments

Comments

Projects
None yet
3 participants
@egonSchiele

egonSchiele commented Apr 9, 2015

Hi there,
I'm the author of contracts.ruby, which is very similar to your library! Its neat to see another library for contracts. But I think we are both unnecessarily doing duplicate work. For example, we recently fixed a bug where putting a contract on a private method would make it public. Rubype has the same issue:

require 'rubype'

# ex1: Assert class of args and return
class MyClass
  private
  def private_sum(x, y)
    x + y
  end
  typesig :private_sum, [Numeric, Numeric] => Numeric
end

MyClass.new.private_sum(1, 2) # => should error with private method `private_sum'

Instead of fixing the same issues twice, maybe we should join forces? You already have knowledge on implementing gradual type checking in Ruby, so your input would be valuable.

@gogotanaka

This comment has been minimized.

Show comment
Hide comment
@gogotanaka

gogotanaka Apr 9, 2015

Owner

@egonSchiele Hi! Thanks for getting in touch with me. it's an honour for me.

You'er right, private method should be private method. Thank you for letting me know!

While I'm appreciate your awesome gem and I know your point(I don't wanna reinvent the wheel too),
I think philosophy are slightly different between contracts.ruby and Rubype.

I'm totally OK with sharing knowledge or thought but I can't help contracts.ruby(I'm so sorry about that)
After watching video you posted on vimeo and using it, I found that contracts.ruby works so well, and has much useful functions.
But I wanna make function simpler and basis for Ruby3.0.

Thanks.

Owner

gogotanaka commented Apr 9, 2015

@egonSchiele Hi! Thanks for getting in touch with me. it's an honour for me.

You'er right, private method should be private method. Thank you for letting me know!

While I'm appreciate your awesome gem and I know your point(I don't wanna reinvent the wheel too),
I think philosophy are slightly different between contracts.ruby and Rubype.

I'm totally OK with sharing knowledge or thought but I can't help contracts.ruby(I'm so sorry about that)
After watching video you posted on vimeo and using it, I found that contracts.ruby works so well, and has much useful functions.
But I wanna make function simpler and basis for Ruby3.0.

Thanks.

@tfausak

This comment has been minimized.

Show comment
Hide comment
@tfausak

tfausak Apr 10, 2015

I think we are both unnecessarily doing duplicate work

👍 This was my first thought upon hearing about Rubype.

I wanna make function simpler and basis for Ruby3.0

Can you expand on this? In what ways in Rubype simpler than contracts.ruby? Or, stated differently, how is contracts.ruby too complex?

tfausak commented Apr 10, 2015

I think we are both unnecessarily doing duplicate work

👍 This was my first thought upon hearing about Rubype.

I wanna make function simpler and basis for Ruby3.0

Can you expand on this? In what ways in Rubype simpler than contracts.ruby? Or, stated differently, how is contracts.ruby too complex?

@egonSchiele

This comment has been minimized.

Show comment
Hide comment
@egonSchiele

egonSchiele Apr 13, 2015

Do you mean you are hoping to get contracts into Ruby 3.0? If so I would love to help.

egonSchiele commented Apr 13, 2015

Do you mean you are hoping to get contracts into Ruby 3.0? If so I would love to help.

@gogotanaka

This comment has been minimized.

Show comment
Hide comment
@gogotanaka

gogotanaka Apr 15, 2015

Owner

@egonSchiele Hi, Matz(author of CRuby) mentioned Ruby3.0 at the RubyKaigi2014: https://www.youtube.com/watch?v=zt56zjNf84Q (there is no English subtitles sorry ;( )

He told about Ruby3.0 + Static typing, but I know Rubype itself is far from what Ruby core team might want. I'm gonna make something more close what Ruby3.0 require and want Rubype become a basis for discussion or something motivating other Rubyist.

Owner

gogotanaka commented Apr 15, 2015

@egonSchiele Hi, Matz(author of CRuby) mentioned Ruby3.0 at the RubyKaigi2014: https://www.youtube.com/watch?v=zt56zjNf84Q (there is no English subtitles sorry ;( )

He told about Ruby3.0 + Static typing, but I know Rubype itself is far from what Ruby core team might want. I'm gonna make something more close what Ruby3.0 require and want Rubype become a basis for discussion or something motivating other Rubyist.

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