[Omake] Newbie: removing quotes for command

Aleksey Nogin anogin at hrl.com
Thu Mar 22 10:06:54 PDT 2007


On 22.03.2007 00:41, Hugo Ferreira wrote:

> I see that one can either use an array or a sequence for OCAMLINCLUDES.
> What is more interesting is that tests in the shell show that the
> application of mapprefix result in the exact same type. When should I
> opt for one or the other?

In general, you can use sequences where the intention is to just 
construct one big sequence and you do not intend to use it as a 
space-separated collection of separate items.

When you do want a space-separated collection of items, it is typically 
better to use arrays. Safer too - if one item happens to have a space in 
it for some reason, arrays would make sure that space is not taken as a 
separator. On the other hand, when you are absolutely sure there will be 
no items with a space inside, you can use either and, as you've noticed, 
it does not really matter.

Also, for arrays there is nice syntax:

A[] =
    a
    b
    c

A[] +=
    d
    e
    f

One of the advantages of the above syntax is that the line-oriented 
version control tools (CVS, Subversion, etc) will assign accurate 
"blame" for each item. Note that the above syntax is the one that you 
need to use when you want to be sure that unexpected spaces would not 
inappropriately break things apart.

Aleksey

-- 
Aleksey Nogin, Research Staff Member
Advanced Technologies Department, Information & System Sciences Lab
HRL Laboratories, LLC, Malibu, CA


More information about the Omake mailing list