Recent

Author Topic: Quizz question [ANSWERED CORRECTLY BY ALLIGATOR]  (Read 2993 times)

Khrys

  • Sr. Member
  • ****
  • Posts: 467
Re: Quizz question [ANSWERED CORRECTLY BY ALLIGATOR]
« Reply #30 on: August 06, 2025, 02:06:03 pm »
Do you refuse to understand this?:
https://rosettacode.org/wiki/Abstract_type

Did you even read that article? From the first paragraph:

Quote from: Rosetta Code
In the languages that do not support multiple inheritance (Ada, Java), classes can, nonetheless, inherit from multiple interfaces.

Pascal doesn't support multiple class inheritance and makes no distinction between abstract and non-abstract classes when it comes to inheritance.
You can't inherit from multiple Pascal classes, whether abstract or not → Pascal classes are not interfaces.



But none of this matters anyway, you're just hung up on terminology (what's the definition of "interface"?) - a common thing to happen during technical discussions, which is fine.
But your know-it-all attitude and hostility toward those who dare to disagree with you is really starting to grate on my nerves.
 

Thaddy

  • Hero Member
  • *****
  • Posts: 19387
  • Glad to be alive.
Re: Quizz question [ANSWERED CORRECTLY BY ALLIGATOR]
« Reply #31 on: August 06, 2025, 03:11:09 pm »
That is not required for the task, otherwise I would have used one of the other two.
"Task: show how an abstract type can be declared in the language. If the language makes a distinction between interfaces and partially implemented types illustrate both."

Nothing there about multiple inheritance.

« Last Edit: August 06, 2025, 03:29:34 pm by Thaddy »
objects are fine constructs. You can even initialize them with constructors.

gues1

  • Guest
Re: Quizz question [ANSWERED CORRECTLY BY ALLIGATOR]
« Reply #32 on: August 06, 2025, 03:49:51 pm »
Did you really write that "Pure abstract classes" are interfaces in FPC? You can't say that by comparing them to COM and CORBA interfaces, in the same list.
It may be the basis of a discussion like the one we're having, philosophical or positional, but you really can't say something like that in a publication like that.

I can't believe FPC would allow something like that to be published. Anyway, this is an FPC question, I've interfered enough already.

PascalDragon

  • Hero Member
  • *****
  • Posts: 6403
  • Compiler Developer
Re: Quizz question [ANSWERED CORRECTLY BY ALLIGATOR]
« Reply #33 on: August 07, 2025, 08:36:18 pm »
A class with only abstract methods can't really be considered an “abstract class” in the general computer science sense, because it will always inherit from TObject and thus will have at least one virtual, non-abstract method (namely Destroy) and multiple virtual, non-abstract class methods.

 

TinyPortal © 2005-2018