#695 Facet default values

tompalmer Tue 28 Jul 2009

Does the value of a symbol affect facets in any way? If not, could we possibly allow symbols without values for the sake of facets (or perhaps other use cases)? Maybe call them abstract if needed for consistency?

qualidafial Tue 28 Jul 2009

I'm wondering if we could separate the symbols for the purpose of facets from those for localization/configuration by using the (presumably) soon to be liberated & curry operator. That way symbols for facets remain as keys only, and symbols for localizing/configuration can act as values by default.

helium Tue 28 Jul 2009

+1

brian Tue 28 Jul 2009

I think there are a couple options to annotate symbols as facets:

  1. do nothing (current design, probably not ideal)
  2. use keyword such as abstract (although technically abstract indicates it must be overridden which might have funny semantics with regards to being consistent with virtual)
  3. use a facet on the symbol (this was my primary thought)

I think the discussion of how to annotate a symbol as a facet is separate from the discussion of whether a default value is required. The most consistent rule would be to follow fields exactly: Bool defaults to false, Int/Float to zero, anything else to null.

tompalmer Wed 29 Jul 2009

funny semantics with regards to being consistent with virtual

Well, it's overridden for particular facet use, but I agree it isn't an ideal match.

anything else to null

But I might like to allow non-nullable types (for when they are present). And I probably really don't want to specify a value.

I think the discussion of how to annotate a symbol as a facet is separate from the discussion of whether a default value is required.

I'm also fine with keeping them as separate subjects for now, though there might be some overlap for intuitive solutions.

tompalmer Wed 29 Jul 2009

As mentioned elsewhere (even if behind the scenes they use the same mechanism, though I'd prefer a distinction there, too) I've decided I'm in favor of marking pure symbols like this (no value):

Str @author

And not using the @ for configuration symbols at all.

Login or Signup to reply.