gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Painter Fuzzy Node in github


From: David Chisnall
Subject: Re: Painter Fuzzy Node in github
Date: Wed, 17 Dec 2014 17:34:41 +0100

On 17 Dec 2014, at 17:23, Johan Ceuppens <address@hidden> wrote:

> Hello,
> 
> I am writing a small prolog system with a decision tree which understands 
> "not x" and "x" for now. This can be used in the CALayer as said before by 
> Ivan here.
> 
> The interface is as follows :
>         //make predicates which is an NSString
>         OpalFuzzyPredicate *pred = [[OpalFuzzyPredicate alloc] init];
>         //initialize it with a string which in this case is multi-worded
>         [pred initWithString:@"update full window";

Sending an init-family method to an object that has already been initialised is 
usually undefined behaviour.

>        //so it becomes a compound, which gets parsed and
>         //adds comp to compound DB and compiles it into the tree
>         InferenceCompound *comp = [factory makeCompound:pred];

What is factory?  In Objective-C classes are usually factories, there's little 
need for the factory pattern in a language where class methods can be 
overridden.

>         
>         pred = [[OpalFuzzyPredicate alloc] init];
>         //initialize it with a string which in this case is multi-worded
>         [pred initWithString:@"not update full window";

Once again.  And why would you want to do this rather than reuse NSPredicate, 
which can already represent and operate on predicates?

> 
>         //so it becomes a compound, which gets parsed and
>         //adds comp to compound DB and compiles it into the tree
>         InferenceCompound *comp = [factory makeCompound:pred];
> 
> I will try to get this in if I can do it.

Given your unwillingness to fully explain what you're doing and the appalling 
quality of your code (some of the diffs you've posted obviously wouldn't even 
compile due to mismatched braces, the rest is broken due to poor understanding 
of Objective-C conventions), I'd be very hesitant about your having commit 
access to a GNUstep repository until you've demonstrated that:

- You can communicate with other developers
- You can write useable code

David

-- Send from my Jacquard Loom




reply via email to

[Prev in Thread] Current Thread [Next in Thread]