Perl doesn't use the Hindley-Milner algorithm, which that article says was "the algorithm first used to perform type inference". Not "the only way to do type inference."
Indeed, but what Perl does still isn't type inference; type inference is something done at compile time, and doesn't really make sense outside of a static type system. The first-sentence summary of a Wikipedia article should not be taken as a definition.
But then what /should/ be taken as a definition? I'm saying, "Saying that 'type inference' means 'type inference' makes sense; and Wikipedia agrees." You say no. Citation needed.
Here's an example of what I call type inference in Perl. It happens at execution, not at compile time. It's also an example of why uncontrolled inference of types is bad:
sub complement { my ($string) = @_; $string =~ tr/acgt/tgca/; return $string; }
$fasta = "aaaccc"; $fasta = &complement(reverse($fasta)); print "$fasta\n";
What do you think this code will produce?
Because I have been learning about Type Theory, I have become much more aware of and interested in Functional Programming.
If you are unfamiliar with functional programming, Real World Haskell describes functional programming like this:
Because of this functional languages have a number of interesting differences with traditional programming. In functional programming: