| ▲ | broken-kebab 3 hours ago | |
The idea looks elegant! The only thing so far which feels not fully fitting is that dot and pipe are often semantically equivalent - applying function to the output of the previous one. And yet you still need to pick the right one. E.g. Clojure (which is too hosted over OOP language) treats dot as an indicator that it's a method, but invocation/application follows the same syntax as any fn: (.method (function arg)) Meanwhile in Rye: "12 8 12 16 8 6" .load .unique .sum when unique and sum are from underlying Golang, but if I made them myself it suddenly has to be: 12 8 12 16 8 6" .load | unique | sum | ||
| ▲ | middayc 2 hours ago | parent [-] | |
Thanks! But words with dots vs. Pipes dont work that way. All functions, user level or builtins (written in Go) (or generic methods that dispatch on the Kind of first arg) have exactly the same calling conventions/rules. Dot vs pipe is a matter of evaluation priority, that works the same on all of them. In fact there are more word types in that "game", words, dotwords, opwords and pipewords :) look here for more: https://ryelang.org/meet_rye/specifics/opwords/ | ||