REBOL3 tracker
  0.9.12 beta
Ticket #0000687 User: anonymous

Project:



rss
TypeWish Statustested Date25-Mar-2009 04:55
Versionalpha 38 Categoryn/a Submitted byBrianH
PlatformAll Severityminor Prioritynormal

Summary CONSTRUCT /only option
Description The behavior of CONSTRUCT in alpha 36 would be useful for data structure construction but is confusing for regular users, so it was changed to be more like R2's CONSTRUCT (better: see #651).

It would still be helpful to be able to CONSTRUCT raw data without special-casing. The REBOL way of dealing with this is to provide a /ONLY option.

Proposed behavior with /ONLY option: Exactly like the behavior of CONSTRUCT in 2.100.36 - no keywords or conversions - except without throwing an error for unset! values (as R2 doesn't).
Example code
; Desired R3 behavior with /only
>> type? get in construct/only [a: true] 'a
== word!
>> type? get in construct/only [a: false] 'a
== word!
>> type? get in construct/only [a: on] 'a
== word!
>> type? get in construct/only [a: off] 'a
== word!
>> type? get in construct/only [a: yes] 'a
== word!
>> type? get in construct/only [a: no] 'a
== word!
>> type? get in construct/only [a: none] 'a
== word!
>> type? get/any in construct/only head insert tail [a:] () 'a
== unset!
>> type? get in construct/only [a: b] 'a
== word!
>> type? get in construct/only [a: 'b] 'a
== lit-word!
>> type? get in construct/only [a: b/c] 'a
== path!
>> type? get in construct/only [a: 'b/c] 'a
== lit-path!

Assigned ton/a Fixed inalpha 39 Last Update26-Mar-2009 23:38


Comments

Date User Field Action Change
26-Mar-2009 23:38 BrianH Status Modified built => tested
26-Mar-2009 19:36 carl Fixedin Modified => alpha 39
26-Mar-2009 19:36 carl Status Modified reviewed => built
25-Mar-2009 05:00 BrianH Description Modified -
25-Mar-2009 05:00 BrianH Code Modified -
25-Mar-2009 05:00 BrianH Status Modified submitted => reviewed
25-Mar-2009 04:55 BrianH Ticket Added -