3 ms·
I don't consider the "let" example to really be very Perlish. The real power of Perl in it's natural expressiveness is to more closely map speaking, and thus t
by kbenson 12y ago
I don't consider the "let" example to really be very Perlish. The real power of Perl in it's natural expressiveness is to more closely map speaking, and thus thinking patterns to how the algorithm is represented. For example, postconditionals, which allow a single statement to be conditional based on a condition that immediately follows it. This is a natural way people express themselves ("do X if Y" or "do A unless B"), but it is wisely restricted to a single statement as the alternative is less common, less clear. The fact that swift's let statement sounds like common English when spoken aloud is only superficially similar to Perl, IMHO.
Additionally some sort of hash/associative array/map data structure at the top level is (thankfully) common at this point.
I haven't followed swift too closely though, so maybe there's other stuff that I would consider more aligned with the spirit of Perl.