Sum types, 2024 variant

2024-06-13 Thread walkr
I think that's better, since for both single and multi-field objects, the `(...)` is consistently applied to perform the unpacking. Perhaps it could even support multiple unpacking variants. For illustrative and comparison purposes: of IfStmt as (cond, left, right): of IfStmt a

Sum types, 2024 variant

2024-06-13 Thread Araq
Yes tuples are allowed and there is no need for double `(())` as it's ugly. How about this syntax: case mytree of StrValue as s: # if s is of type string of Minus as m: # then m is of type UnaryOp # or of Minus as (m): # unpacking, m is of type Tree of IfStmt as

What Araq thinks about HappyX?

2024-06-13 Thread Qtless
sounds really good!

Sum types, 2024 variant

2024-06-13 Thread walkr
I'm also thinking about tuples. Are they supported in sum types? type Device = case of Mobile: (string, int) of Server: (string, int, bool) let device: Mobile = ("iPhone", 15) Run How will they be unpacked? Can I do this? cas

What Araq thinks about HappyX?

2024-06-13 Thread dwhall256
Instead of a meet-up; how about a community code roast. Once a month, someone (the host/author) nominates a project they want help improving. The community all pitches in on ideas to make it better; it could be a quick write-up or a thorough PR.

This Month with Nim: October 2023 to June 2024

2024-06-13 Thread moigagoo
Wu-Tang is for the children!

https://nexalyn-denmark.company.site/

2024-06-13 Thread getnexalyndenmark
Køb nu Officiel hjemmeside:- Officiel hjemmeside:- HOVED BLOGS :-

Hemp smart CBD Gummies New Zealand Reviews?

2024-06-13 Thread moniroyss
Smart Hemp Gummies Australia Reviews – CBD products can help alleviate symptoms of anxiety, stress, and other chronic pain conditions. CBD products are used by 20% of young adults (18-29 years old). It's not surprising that CBD Gummies are so widely consumed. Only a few of the many CBD Gummy bra

Sum types, 2024 variant

2024-06-13 Thread Araq
That is what the RFC was changed to but `Constr as x` vs `Constr(x)` is hard to teach and remember.

Sum types, 2024 variant

2024-06-13 Thread ElegantBeef
A possible solution is to use `as` for matching the branches so it'd be `string as s` instead. For specific field matching `Type(a, b, c)` would do positional matching. With an added `Type(a: fieldName)` it could even be expanded for named matching where it'd grab the field of typed branched obj

Sum types, 2024 variant

2024-06-13 Thread Araq
The most pressing unsolved problem. Assume we have: type IfTree = object condition, thenPart, elsePart: Tree ProcTree = object fn: Tree args: seq[Tree] UnaryOp = object arg: Tree Tree = ref case o

https://www.facebook.com/Official.Natures.Leaf.CBD.Gummies/

2024-06-13 Thread Shibaa026
Nature’s Leaf CBD Gummies [https://www.facebook.com/Official.Natures.Leaf.CBD.Gummies/Nature's](https://www.facebook.com/Official.Natures.Leaf.CBD.Gummies/Nature's) Leaf CBD GummiesThe going with frames the regarding structures for Nature’s Leaf CBD Gummies considering the open thing responsibil

This Month with Nim: October 2023 to June 2024

2024-06-13 Thread Araq
Nim 2.2 is also just around the corner: Only one showstopper bug left: