onethirtyfive has quit [Ping timeout: 250 seconds]
soveran has joined #crystal-lang
<FromGitter>
<iDev0urer> So correct me if I'm wrong, but Crystal doesn't have any kind of `interface` structure does it?
<FromGitter>
<jwoertink> Like Java?
<FromGitter>
<jwoertink> You could just make a module and include it in your class.
<FromGitter>
<iDev0urer> Yeah, something like that. Just a way to tell the type system that a Class or Struct contains certain methods or properties so that the interface can be referenced rather than the Class. Or is that how module including works?
<FromGitter>
<iDev0urer> Guess you answered while I was typing haha
<FromGitter>
<jwoertink> When you have a module and you define instance methods then include it in a class, that class now has those instance methods
soveran has quit [Ping timeout: 276 seconds]
<FromGitter>
<iDev0urer> So can I use `Iterable` as a type parameter on a method and then pass in anything that includes that module, like Hash?
<FromGitter>
<jwoertink> If you extend the module `extend SaidModule` those methods become class level methods
<FromGitter>
<iDev0urer> Ahhhh ok
<FromGitter>
<iDev0urer> That's one thing that I haven't understood about Ruby and Crystal until now
<FromGitter>
<jwoertink> Ah. Yeah, that's the difference between `include Mod` and `extend Mod`
<FromGitter>
<jwoertink> Just changing Thing.new.whatever vs Thing.whatever
<FromGitter>
<jwoertink> Oh, as for your Iterable question, if I understand correctly, I don't think so
<FromGitter>
<jwoertink> But not 100% sure on that
snsei has quit [Remote host closed the connection]
<FromGitter>
<iDev0urer> This is where interfaces are gold
jeromegn has quit [Ping timeout: 250 seconds]
jeromegn has joined #crystal-lang
jeromegn has quit [Ping timeout: 260 seconds]
jeromegn_ has joined #crystal-lang
soveran has joined #crystal-lang
HakanD_ has quit [Quit: Be back later ...]
HakanD_ has joined #crystal-lang
soveran has quit [Ping timeout: 260 seconds]
HakanD_ has quit [Client Quit]
HakanD_ has joined #crystal-lang
HakanD_ has quit [Ping timeout: 265 seconds]
onethirtyfive has joined #crystal-lang
onethirtyfive has quit [Ping timeout: 260 seconds]
Philpax has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 245 seconds]
matp has joined #crystal-lang
Philpax_ has joined #crystal-lang
Philpax has quit [Ping timeout: 260 seconds]
kulelu88 has quit [Quit: Leaving]
Philpax_ has quit [Ping timeout: 260 seconds]
dhk has quit [Ping timeout: 244 seconds]
gloscombe has quit [Remote host closed the connection]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 252 seconds]
bjz has joined #crystal-lang
bjz has quit [Client Quit]
bjz has joined #crystal-lang
bjz has quit [Client Quit]
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 252 seconds]
onethirtyfive has joined #crystal-lang
bjz has joined #crystal-lang
onethirtyfive has quit [Remote host closed the connection]
bjz has quit [Ping timeout: 260 seconds]
bjz has joined #crystal-lang
Philpax has joined #crystal-lang
<crystal-gh>
[crystal] iDev0urer opened pull request #3459: Add checkbox support to markdown (master...add-checkbox-support-to-markdown) https://git.io/vPbz9
soveran has joined #crystal-lang
pawnbox has joined #crystal-lang
Philpax_ has joined #crystal-lang
Philpax has quit [Ping timeout: 260 seconds]
Philpax__ has joined #crystal-lang
Philpax_ has quit [Ping timeout: 244 seconds]
soveran has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
<BlaXpirit>
iDev0urer, just use duck typing then, don't specify the type