On Tue, Mar 3, 2020 at 10:12 AM Marc Nieper-Wißkirchen <xxxxxx@nieper-wisskirchen.de> wrote:
 
No one would forbid you or R7RS-large to solely use #f as defaults in their APIs. For most APIs it is possibly a very good idea based on your arguments.

As a Scheme programmer, I value my freedom. :)

You are of course free to replace any library you like, though it may be hard to replace the base library.  As long as keyword processing is not a base language feature, this can be achieved.  SRFI 177 in particular can certainly be replaced, even if it becomes part of R7RS.
 
You lose abstraction and expressiveness.

You trade those off to gain convenience, which is also why (car nil) => (cdr nil) => nil), originally an Interlisp feature that was adopted into Common Lisp and that CL programmers now find very useful.

On Tue, Mar 3, 2020 at 10:27 AM Lassi Kortela <xxxxxx@lassi.io> wrote:

Arguably, any use of keyword arguments is non-ideal design

Actually I don't know of anything better for building a complex immutable object, especially ones with dependencies between its components.  For example, it may be necessary to supply either :foo and :bar, or :foo and :quux, or :bar, :quux, and :baz to create a well-defined object.  There can be lots of t of other rules such as "either :pippo or :paperino but not both" or "if :plugh then also :xyzzy, but :xyzzy may be present on its own".  Case-lambda is pretty helpless here.

The Builder pattern of having a mutable object with lots of mutators and a build operation that translates the object into its immutable equivalent is definitely second best here.'

JavaScript's null vs undefined is a good example. I can never remember
what the point of "undefined" is, and in what situations it's different
from null.

Undefined is *really* just a convenience feature.  Most languages throw an error at compile time or run time when you access an unbound variable or an unknown member of an object.  Java returns undefined instead.  Since undefined is falsy, this makes some tiny scripts even tinier.  There is also the problem of Java == instead of ===; the latter is identity, the former is "Don't use that".

Null is a distinguished and immutable JavaScript object with no properties.

On Tue, Mar 3, 2020 at 10:51 AM Marc Nieper-Wißkirchen <xxxxxx@nieper-wisskirchen.de> wrote:

In Scheme, you could transparently add an "undefined" value as well. Just add to the specification that "(if #f #f)" and procedures that are solely called for side effects shall return "undefined" and not some unspecified value.

Many Schemes actually do that, but not all, and it's nothing we want to require.

(.sig below chosen at random, but quite apropros)



John Cowan          http://vrici.lojban.org/~cowan        xxxxxx@ccil.org
The known is finite, the unknown infinite; intellectually we stand
on an islet in the midst of an illimitable ocean of inexplicability.
Our business in every generation is to reclaim a little more land,
to add something to the extent and the solidity of our possessions.
        --Thomas Henry Huxley