Difference between abstract def and def

If something is documenting and outlining an interface, that’s not something that is “abstract”.

The word is a misnomer, and it’s sad you don’t see that.

But one definition of ‘abstract’ in English is this:

Expressing a particular property of an object viewed apart from the other properties which constitute it; – opposed to concrete.

Doesn’t this kinda make sense?

1 Like

What I’ve been saying all along

1 Like

I’ve been going off the definition you posted earlier in the thread.

@phpdude. Thanks for the link. IMO, properties of a Parent -> Client class are linked. Not really “viewed apart from”. They are even more linked when using abstract, because now the children must have those methods.


In any event (not directed to anyone specifically): I can think of at least 3 words that more accurately describe what this " abstract" word is doing. However, I’m not going to post them, because a: I’ll be told I am wrong no matter what I say, and b: it seems like a personal problem with the definition. I just think there are much better words for it.

I hope you guys continue to have fun on gitter. Thanks for putting down my Crystal Chat project that I was having a blast creating. I was about to release it on GitHub (and buy a domain and VPS for it for fun). I thought it would be quite cool to accept PRs as I knew blacksmoke was probably gong to find some code and be like wtf :P. But definitely not going to do this now. Because heaven forbid, a crystal hobbyist works on something for fun!

The moment you start posting your code publicly, or tell people about what you are doing… it’s like a pack of hyenas ready to devour you. Or, if you do things a non-conventional way, it’s time for some shunning!! I think this is very dangerous.

Luckily, the core developers are not like that.

1 Like

My two cents that I believe weren’t mentioned:

  1. The term “abstract method” is not a Crystal invention. Even if there is a better term, this one is so ubiqitous that not using it is probably a disservice to the users.
  2. Using an empty (or some other kind of default) method instead of an abstract one is fine (and probably indeed preferrable) as long as there is a sensible default. Sometimes there is none though.
  3. Not declaring a method at all instead of declaring an abstract method takes it out of the contract, making it optional.
  4. Finally, this discussion revolves mostly around classes, however imo the best examples should be made using modules. The whole concept of an interface becomes mostly useless without abstract methods.