| Sigils in Perl were awful. They didn't behave concretely. Sometimes it was sort of a type annotation sometimes they were a weird incantation. Things like implicit scalar conversion @foods = qw(burgers fries shakes);
$length = @foods;
print $length, "\n";
Yeah it's easy to understand once you know what is happening but it's obscure. There are no easy clues to let you know what is happening.Then there are situations where you have a scalar but it's a ref %author = (
'name' => "Harsha",
'designation' => "Manager"
);
$hash_ref = \%author;
So it's not a type its more of a language implementation detail that doesn't add value to the programmer.Where as with the Hindley–Milner type system the types exist and add value without requiring all of the extra code. You can infer the type most of the time and you get a nice strong type check at compile time. Sigils seem like a step in the opposite direction to strong inferred types. You have to add a little bit of boiler plate but it's not that strict so it's meaning can still be confusing. |