Re: [OE vs Phix] assigning atom to a slice is different

new topic     » goto parent     » topic index » view thread      » older message » newer message
petelomax said...

s[2..-2] is exactly the same as s[2..3] for a length 4 sequence, it does not reverse the slice being copied, dunno what made you think that.

I didn't think that. This form of insert() is an anomaly, so my instinct is to make different offerings to it and see how it responds. As you know in OE sub-sequencing, the negative terms are accepted if in range. However, i do not know beans about Phix, and cannot test this myself, mostly because of my inability to finish the install process.

petelomax said...

A real-world example of this being useful could be a template letter containing "Dear [name],\nThank you for..." and you want to put the actual name in there.

Hmm, ok. I'd be using some form of replace("[name]",s[x]) there instead.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu