Talk:User defined pipe and redirection operators: Difference between revisions

Line 76:
OP TAIL = (INT n)MANYTOONE: tail(n,);</lang>
 
Note that this "''tail''" implementation requires just one argument "n", keeping things simple to satisfy the use of tail in the "''Sample shell script''". I'm not asking for reinvention of head/tail etc, just enough to run the "''sample shell script''", basically a proof of concept the each particular language.
 
'''Rationale''': Pipes appear in a hoard of different languages. It always bugs me when a feature is '''cemented'' in a language and hence cannot enhanced. Being such a useful concept, it would be nice to simply define a few operators and have piping/redirection available in any language.
[[User:NevilleDNZ|NevilleDNZ]] 02:57, 13 September 2011 (UTC)
 
Indeed, having to the ability to add pipes & redirections to a language means a coder can evolve the definition to match the environment. For example the pipe/redirection operators defined above are "[[Strong typing|string typed]]" (currently STRING), hence the compiler will detect data of the wrong type being piped and report a '''compile time''' semantic error, hence one [[Unit_testing|unit test]] just wrote itself!! (joy).
 
[[User:NevilleDNZ|NevilleDNZ]] 0203:5710, 13 September 2011 (UTC)