Another thing that language designers should be very aware of: defaults are extremely important! Most developers will never bother to use anything other than a default even if another choice would better suit the use case.
I mean how many people use an unsigned integer as an index in a looping construct? Yet consider how many times you've needed a negative index into, well, any data structure? But because signed integer is the default that's what usually ends up getting used!
=> More informations about this toot | More toots from onorio@mastodon.acm.org
2/2 This is one of the reasons I like languages like F#, Scala and Rust. They default to immutable values but they give the developer the means to make things mutable if it's justified.
=> More informations about this toot | More toots from onorio@mastodon.acm.org
@onorio The problem with defaults is a tough one. I'm no language designer, but what about Checked vs Unchecked exceptions? Or public vs private? It depends on the design philosophy, usage scenarios considered, and well, perhaps even guesses at use of the language designers. And they aren't necessarily the day-in-day-out users of the language.
=> More informations about this toot | More toots from rebeccawb@discuss.systems
@rebeccawb You raise some excellent points. I guess it's my thinking that picking reasonable defaults and leaving the escape hatch (that is, a developer can always get to the non-default use) saves a lot of grief. Of course that's assuming that we can agree on "reasonable defaults" and that's a pretty large assumption.
I'm not a language designer either so I'm just making some broad assertions based on my experience of software development so take anything I say with a boulder of salt. :)
=> More informations about this toot | More toots from onorio@mastodon.acm.org This content has been proxied by September (3851b).Proxy Information
text/gemini