It's good until you want to customize it a lot.
I guess I've always customized them a lot, because it's so helpful IMO. e.g. zero padding counts and ISO8601 formatting dates, so lexical sorting works.
`"..."`is so utterly bad for you, let's consider just an empty issue
# "...", because
#`is completely ugly and using only opening quote makes no sense to me, if it's quotes they should be on both ends.
# "..."is somewhat similar to char syntax though. But then any other symbol allowed in issues will be better than backquote.
Which way to you guys use
try most of the time?
if error? try [...] [..after-error recovery..]
set/any 'err try [...] (... later err is processed...)
Please post your answers into thread if possible. Thanks.
try/catchisn't a thing. We have
throw/catchwhich is not specifically error related, but is about general non-local flow control.
Do we have a function that creates a contex and binds the following code to context it running?
I want to create a
with [a: 33 c: 33] [...code...]
Which is equivalent to:
do bind [...code...] make object! [a: 33 c: 33]
But I would like to know if it already exists.
Here I am again:
Why not allowing
SET? It would make setting values in context very easy: (Please pardon me the wrong usage of
IFbut I have still not studied it)
valid?: func [data test-name] [ result: switch test-name [ size [either data ... [true] [false]] position [either data ... [true] [false]] ] ] options: [size 00x200 position above] ctx: make object! [ size: none position: none ] parse options [ set ctx/size 'size pair! (if not valid? ctx/size 'size] [fail!] set ctx/position 'position word! (if not valid? ctx/position 'position] [fail!] ]
options:[size 300x200 position above]
3for no reason!
ctx. E.g. working example:
between?: func [data min-test max-test][ all [min-test <= data max-test >= data] ] valid?: func [data test-name] [ switch test-name [ size [all [between? data/x 250 500 between? data/y 200 400]] position [find [above below left right] data] ] ] ctx: make object! [size: none position: none] options: [size 300x200 position above] parse options bind [ 'size set size pair! if (valid? size 'size) 'position set position word! if (valid? position 'position) ] ctx == true ctx == make object! [ size: 300x200 position: 'above ]
parse options [set ctx/size ..]as
parse options reshape [set !(in ctx 'size) ..]. See reshape
struct: [size "aaa" position "bbb" color [background none text none]] options: [size 300x200 position above background red] parse options [ 'size set struct/size pair! if (valid? struct/size 'size) 'position set struct/position word! if (valid? struct/position 'position) 'backgound-color set blk/color/background word! if (valid? blk/color/backgropund 'colors) ]
Reshapeare nice functions but the former does not use path notation; the latter uses it but statically, at rules block binding.
set wordis expressed as
setrule: [set word]