You can emulate this behaviour somehow by not implementing the methods that is
abstract, and prevent instantiation by introspecting and throwing exceptions in
-init;. Definitely non-trivial but works.
On Mar 19, 2014, at 23:43, William Squires wrote:
>
> On Mar 18, 2014, at 9:29 PM, Luther Ba
On Mar 18, 2014, at 9:29 PM, Luther Baker wrote:
> On Tue, Mar 18, 2014 at 8:11 PM, Kyle Sluder wrote:
> On Tue, Mar 18, 2014, at 05:30 PM, William Squires wrote:
> > Hi all!
> > Obviously (IIRC) a pure abstract class would map to a formal protocol
> > in ObjC (or a class interface in langu
On Mar 19, 2014, at 7:32 AM, Sixten Otto wrote:
> (I'm hard pressed to think of much use for such a "pure" abstract class,
> though; what could you do with such a thing that couldn't be done with
> interfaces.)
"Pure abstract class" is a C++ term. It's the C++ equivalent of an interface.
It's
On Tue, Mar 18, 2014 at 5:30 PM, William Squires wrote:
> My best guess is to:
>
> 1) Make an ObjC class, and have it implement those methods that subclasses
> don't have to override. For those the subclasses must override, implement a
> stub that raises an exception if a message is sent to it (as
On Wed, Mar 19, 2014 at 12:38 AM, Luther Baker wrote:
> On Wed, Mar 19, 2014 at 12:14 AM, Sixten Otto wrote:
>
>> The significant difference, though, between an abstract class in Java or
>>
> C#, and a protocol in Objective-C, is that the former may have substantial
>> implementation associated w
> And more to the point, I think the original poster already knows what you
> are saying. I think he is asking for thoughts regarding his approach to
> simulating a notional Abstract Class via mix of @protocols and @classes in
> Objective-C. He clearly knows he can't do it with @protocols alone.
>
On Wed, Mar 19, 2014 at 12:14 AM, Sixten Otto wrote:
> On Tue, Mar 18, 2014 at 7:29 PM, Luther Baker
> wrote:
>
> > A _better_ analogy to an Objective-C @protocol would be a formal Java
> > interface.
> >
>
> Sure. And the same in C# (which the OP was asking about).
>
>
Can't tell if you are agr
On Tue, Mar 18, 2014 at 7:29 PM, Luther Baker wrote:
> A _better_ analogy to an Objective-C @protocol would be a formal Java
> interface.
>
Sure. And the same in C# (which the OP was asking about).
> So, Kyle may have good reasons for his answer - but if I understand the
> essence of your ques
On Mar 18, 2014, at 7:29 PM, Luther Baker wrote:
> A _better_ analogy to an Objective-C @protocol would be a formal Java
> interface.
In their design, Java’s interfaces were explicitly modeled on Objective-C’s
@protocol construct.
-- Chris
___
C
On Tue, Mar 18, 2014 at 8:11 PM, Kyle Sluder wrote:
> On Tue, Mar 18, 2014, at 05:30 PM, William Squires wrote:
> > Hi all!
> > Obviously (IIRC) a pure abstract class would map to a formal protocol
> > in ObjC (or a class interface in languages such as REALbasic/Xojo, or
> > VB 6). My best
On Tue, Mar 18, 2014, at 05:30 PM, William Squires wrote:
> Hi all!
> Some languages (like C++ and Visual C#) allow for partial abstract
> classes (i.e. some methods are implemented, while others are left to
> subclasses to implement - and, in fact, must implement since the
> partial abstra
11 matches
Mail list logo