Jump to content

Talk:Tokenize a string: Difference between revisions

→‎Remove tr: tr still isn't a programming language. It is described and known as a Unix utility.
(→‎Remove tr: Conterarguments to removing tr.)
(→‎Remove tr: tr still isn't a programming language. It is described and known as a Unix utility.)
Line 8:
: I also agree it's broken with respect to meeting the task requirements. Using a period for item separation is unidiomatic for the context within which tr would get used for such a purpose. More appropriate would be replacing the , with a newline. Still ''more'' appropriate would be replacing it with a null character.
: The question of how many tasks tr can perform is a question of the tool's domain; Its parameter syntax effectively puts it in the category of a domain-specific language. If there are other languages which service the domain (which practically any string processing language does, in addition to '''sed''', another common UNIX tool), then it becomes worthy of intradomain comparison with those languages. If the issue is whether or not a particular UNIX tool can be considered a language in and of itself, then consider whether or not that tool is part of a POSIX spec; It's plausible that that particular spec might be a more suitable umbrella for the code example. --[[User:Short Circuit|Short Circuit]] 02:45, 21 May 2009 (UTC)
Hi Short Circut, If the tasks ask us to write a program to do something then we should use a programming language and tr is not a programming language. It is a program, a utility. Just because the program can be applied to give the right answer doesn't make it a programming language in the conventional sense. If you look at the man page for tr or the [[wp:http://en.wikipedia.org/wiki/Tr_(Unix)|WP]] page, it is not billed as a programming language. I am not saying that tr cannot produce the right output. I do think you go to far in calling tr a programming language as you would then allow too much 'noise' in RC. What is to stop anyone using your argument to add the Unix <code>sort</code> command to each and every one of the RC sort algorithm entries? or <code>echo "the correct answer"</code> to numerous tasks? I think that this would be a good point to make the distinction.<br>
Calling tr a programming language would leave you out on a limb w.r.t. tr's documentation and articles about tr on the web such as [[http://www.linfo.org/tr.html tr]], and [[http://www.gnu.org/software/coreutils/manual/html_node/tr-invocation.html#tr-invocation GNU tr]].<br>
As for the phrase 'domain-specific language' it has little real use as it is so widely applied, and should not be confused with a [[wp:Alphabetical_list_of_programming_languages|programming language]] in this context
 
==Unix Pipes and the shell==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.