Vyxal / Vyxal

A code-golfing language experience that has aspects of traditional programming languages - terse, elegant, readable.

Home Page:https://vyxal.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make one of the cartesian product elements a digraph

ysthakur opened this issue · comments

They're taking up valuable space, so one of them could be moved into a digraph. Most of the time, the order doesn't matter, but people also don't use infinite lists that often. One disadvantages of moving the safe version to a digraph is that if someone tries to use cartesian product on an infinite list, their program will hang and they might find it hard to figure out why. One disadvantages of moving the unsafe version to a digraph is that if someone depends on the order of the output and they unwittingly use the safe version with its weird order, it's going to be hard to diagnose why their program isn't working.

Alternatively, a flag could be added to prefer infinite-list-safe operations over strict ones.

commented

There's been too many times where I've needed the unsafe option but had to settle for sorting the safe option, taking up more bytes. Making both of the cartesian products monographs was intentional, and is something I would prefer to keep.

Also, the flag option sounds like pain on all fronts (implementation + downvote potential)