Comment

Comment by kjksf

Given that this contrasts a JavaScript implementation with Rust implementation compiled to WASM: my 5 minute investigation shows that Rust doesn't have optional arguments at all.

So in Rust you would be forced to write it the way you consider to be "bad idea".

Many people think that default function arguments are a bad idea and languages like Rust or C or Go or Java don't even have them.

parent kjksf 8 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton