-
-
Notifications
You must be signed in to change notification settings - Fork 187
Description
First, thank you for all the work on Fluid and the upcoming 3.0 release!
Background
The Liquid documentation declares nil as the null value, but the Shopify team decided to use null instead because they prefer (they still have nil in some places...) it and Ruby works fine with both: Shopify/dawn#2115 (comment)
Issue
Previously, I've just added a static Null field that references NilValue.Instance to the model to handle this:
public static FluidValue Null => NilValue.Instance;However, 3.0.0-beta1 doesn't recognize it. Is this an intentional part of the transition from MemberAccessStrategy?
Discussion Point
More broadly, the problem of null values usage in Liquid templates might be worth discussing itself. For Shopify theme compatibility, supporting null as an alias for nil would be valuable.
Is there a recommended approach for handling this in 3.0? Should we:
- Register
nullas a global value inTemplateOptions? - Use a custom member accessor?
- Something else?