good chemistry is complicated,and a little bit messy -LW PerlMonks

### Re: RFC: A Beginners Guide to Fuzzy Rules-Based Systems

by Ovid (Cardinal)
 on Oct 12, 2006 at 09:55 UTC ( #577790=note: print w/replies, xml ) Need Help??

Your explanation seems clear (well, I think it's clear, given that I don't know much about this area), but I'd make a tiny, almost unrelated change:

my \$fis = new AI::FuzzyInference;

We're trying really hard to discourage indirect object notation. That's better written as:

my \$fis = AI::FuzzyInference->new;

Indirect object notation can lead to annoying bugs. perlobj has a good discussion of the problems in the "Indirect Object Syntax" section.

Cheers,
Ovid

New address of my CGI Course.

Replies are listed 'Best First'.
Re^2: RFC: A Beginners Guide to Fuzzy Rules-Based Systems
by lin0 (Curate) on Oct 12, 2006 at 13:43 UTC

Hi Ovid,

thank you very much for the comment. I just updated the node to reflect your suggestion.

Cheers!

lin0

Re^2: RFC: A Beginners Guide to Fuzzy Rules-Based Systems
by halley (Prior) on Oct 12, 2006 at 17:32 UTC
I'm sorry, but after many years of using many languages, I am not at all inclined to consider \$f = Foo->new() as if it were a method on the type. I will continue to use \$f = new Foo() as if it were an operator built into the language, because it feels more literate and readable.

Even with the same sort of bugs, I don't see a lot of people clamoring for a shift to \$fh->print @list syntax.

--
[ e d @ h a l l e y . c c ]

I'm sorry, but after many years of using many languages, I am not at all inclined to consider \$f = Foo->new() as if it were a method on the type.

What does how other languages work have to do with how Perl works? In Perl, it's a class method. It's not a keyword.

I will continue to use \$f = new Foo() as if it were an operator built into the language, because it feels more literate and readable.

Okay, but good luck debugging it when it fails in weird and unexpected ways.

Even with the same sort of bugs, I don't see a lot of people clamoring for a shift to \$fh->print @list syntax.

I suspect you don't know why the indirect object notation can fail then. It's a lot more difficult to call print with filehandle and a bareword as arguments, but PBP suggests instead print {\$fh} @list.

Create A New User
Node Status?
node history
Node Type: note [id://577790]
help
Chatterbox?
and the daffodils sway...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2018-06-24 20:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
Should cpanminus be part of the standard Perl release?

Results (126 votes). Check out past polls.

Notices?