Comment

Comment by awesome_dude

For my $0.02 - it depends where you want to put the onus

Statically typed languages put the onus on the caller to transform the data into the shape(s) required.

Dynamically typed languages put the onus on the called to handle anything.

That is, in a dynamically typed environment your function has to defensively code for every possible type it could be handed.

parent awesome_dude 5 months ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton