<FromGitter>
<asterite> wow, that static thing is real sorcery
<raz>
looks not very practical to me tho
<raz>
more like an impressive card trick :D
<raz>
but i love the {file:line} as key trick
<raz>
i wonder if that type of black magic could be used to solve such it in a more general fashion at a compiler level (without magic macros)
<raz>
like, a RubyHash type, that just magically behaves like a ruby hash, nesting and all
* raz
puts down the pipe for a moment
<oprypin>
raz, re "not very practical" - see the alternative in the other link. i'm just converting preexisting c++ code which abused static, and unless i do the same, i'm forced to move the definitions away from the usages *and* manually resolve naming collisions
<oprypin>
aaa i really need a good merge tool now. really it's enough for me just to see the side by side view and make it editable
<renich>
Where can I find documentation about the T object? I mean, every time I look at the crystal source code, I see a ton of use of T and I dunno where to read about it.
<FromGitter>
<naqvis> renich convention is to say type as *T* in generics. When you use generic types like collections for example then you provide the actual type for which you want the container to represent. For example when you want to create an `Array` of `Int32` you will do `Array(Int32).new`, similary same generic code will allow you to create an Array of other types like `String`, `Float32` etc
<renich>
naqvis: OK. Thanks a lot. Kind of get it. It's like a wildcard type that will become whichever type you assign to it. Right?
<FromGitter>
<naqvis> yeah 👍
<renich>
awesome. Thanks a lot. Did you find that in the docs? If so, where?
<FromGitter>
<naqvis> But `Generics` concept is language agnostic and many languages support Generics and Crystal is one of them
<renich>
naqvis: right on.
<FromGitter>
<naqvis> 👍
renich has quit [Quit: Leaving.]
<oprypin>
following up on [16:33:15] <oprypin> raz, re "not very practical" - see the alternative in the other link. i'm just converting preexisting c++ code which abused static, and unless i do the same, i'm forced to move the definitions away from the usages *and* manually resolve naming collisions