Hacker News new | ask | show | jobs
by snaky 3596 days ago
The only difference is a selection of basic types. There's just no such types as string or int in Perl, Perl is a contextually polymorphic language whose scalars can be strings, numbers, or references (which includes objects). Although strings and numbers are considered pretty much the same thing for nearly all purposes, references are strongly-typed, uncastable pointers with builtin reference-counting and destructor invocation.
1 comments

For me the compile time and runtime distinctions are more important.
Reflection you need to use, whether it be with interface{} in Go or with $scalar in Perl is runtime thing. reflect.TypeOf(tst), ref($tst) - there's no much difference.

Type mismatch errors for basic types are handled in compile time, be it Go or Perl.