Here is what I mean when I use the phrase "actively harmful":
In Swift, we aim for designs that actively guide or steer the user towards doing the "right thing." It can be hard to define holistically but it isn't hard to give some good examples:
- Swift actively steers users towards preferring memory-safe operations over memory-unsafe operations.
- Swift actively steers users towards considering what to do in the case of recoverable failures rather than ignoring them: for instance, users have to spell out what to do in the case of
nil
and what to do when aguard
condition evaluates tofalse
rather than rely on implicit default behavior. - Swift actively steers users towards Unicode-correct operations on strings.
There can be (and, I think we'll agree, already are) suboptimal features in Swift that don't quite accomplish the intended goals, and there can be features that do not help or hurt users to do the "right thing." Those are not "actively harmful"--or even, for that matter, harmful.
A feature is actively harmful when, given two options--one that is more likely to be memory safe, defined behavior, within a human user's ability to reason through, etc., and one that is harmful (by being memory unsafe, or undefined behavior, or beyond a human user's ability to reason through, etc.), the design of the feature is such that it guides or steers users towards the harmful option. The companion bit that's usually implied is that there must be a viable alternative design or course of action that accomplishes similar goals to the actively harmful feature, but that steers the user towards the more salutary option or at least doesn't favor the harmful one.