<hightower2>
Hey what was the original reason for preferring naming classes like JSON::SerializableError instead of JSON:Error::Serializable?
<hightower2>
::*
<FromGitter>
<Blacksmoke16> prob just shorter names
<FromGitter>
<raw-bin> Hi. Is it possible to force an abort from within a macro hook (`finished` in particular). A call to `abort` doesn't work with an undefined macro method complaint.
<FromGitter>
<Blacksmoke16> nope, best you could do is like `raise ""`
<FromGitter>
<raw-bin> What I'm looking for is a way to abort the compilation.
<FromGitter>
<Blacksmoke16> whats the use case?
<FromGitter>
<raw-bin> Thanks @Blacksmoke16! (As always!). The use case is being able to check whether a derived class instance implements a bunch of methods defined in the parent class.
<FromGitter>
<raw-bin> I realise that using abstract classes and abstract methods is the 'right' way to do this but that lands me into another problem.
<FromGitter>
<Blacksmoke16> id use `raise` with an error message sayings whats wrong
<FromGitter>
<raw-bin> That should work. Thanks.
<FromGitter>
<Blacksmoke16> but yea, whats the other problem?
<FromGitter>
<raw-bin> Thanks for asking! So I have an abstract class A which specifies an abstract method M. The intent is typical: Make sure that all classes derived from A implement M. There are also derived classes B and C, both derived from A. Now, I wanted to create a Hash(String, A) in the hope that I could use it to insert instances B or C. Crystal doesn't allow this because Hashes need concrete types as parameters.
<FromGitter>
<raw-bin> There's a fair chance my fundamentals are wrong! I'm a n00b.
<FromGitter>
<Blacksmoke16> pretty sure that should work just fine
<FromGitter>
<Blacksmoke16> got a playground link or something of what you want not working?
<FromGitter>
<raw-bin> Let me put something simple together.