Yes! I've written shell scripts in Arc, and I've noticed that the Unix concept of pipes (and especially the syntax for them) is very elegant and concise.
But why not just make it a binary operator, like in Unix?
x | y | z
(z (x y))
I'll note that this would solve a problem I've been having... In particular, notice this pattern:
(w/foo 1 (w/bar 2 (qux)))
The above could be written as this, instead:
(qux) | w/bar 2 | w/foo 1
Hm... perhaps the bars should be reversed, so it would be like this:
w/foo 1 | w/bar 2 | (qux)
I've had some situations where I kept wishing I had some syntax to make them shorter, but I wasn't sure exactly what kind of syntax would help...
Hmm, you mean an infix operator, right? I'm not sure how to fit an infix operator into an otherwise prefix language. I'm sure lots of questions arise. Operator precedence, where the right-hand arg terminates. If there's a simple model that answers those questions well that would be great.
The new wart interpreter (http://arclanguage.org/item?id=14881) no longer reserves '|' for syms. It also lets you skip parens and use indent if you choose.
wart> assign f 3
wart> f
3
wart> assign f (lambda() 34)
wart> (f)
34
wart> def f()
35
; extra <enter> like python
wart> (f)
35
Well, I prefer the left-to-right dataflow, but that might just be force of habit, and this version is a lot cleaner and simpler to implement. Not sure about '//' for the macro name (looks like division), but this looks the best way to do this.
Ah, make that deja vu and egocentrism-based dyslexia. ><;
Implementing the pipeline left-to-right order is just a matter of switching "before" and "after," I think.
Hmm, macros and special forms seem a bit confusing that way around... but maybe they'd just look like list comprehensions or something. What about having both operators? What might their precedence be like?
As far as naming goes, I was trying to pick something unused that would appear to be part of the parenthesis in some way. :-p
(<< a b c : x y z) => (a b c (x y z))
(>> a b c : x y z) => (x y z (a b c))
then? Still looks slightly like less-than/greater-than, but this gives a visual cue for data direction, and avoids needing to care about relative precedence.
Fyi, your other comment on this thread (http://arclanguage.org/item?id=14886) is dead. It was obviously a valid post, but it apparently tripped the detector.