RE: Is subscripting a slice useful

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

<snip>

> > Readability is more important than compactness of code.
> 
> I agree, and that has been a consistent stance of mine too.
> Did I suggest otherwise? On the other hand, verbose code does
> not automatically imply readability either - see COBOL for
> numerous examples!

I just was establishing my perspective.
And yes, verbose code is not readable either. A balance must be found.

> 
> > I agree that implementing vertical slicing in that manor 
> 
> Which manner? My code above or the examples that Christian provided?
> 

The one which allows the user to create multidimensional slices. From 
what I can tell both proposals lend to that.

> > would be significantly detrimental to the readability of euphoria
> > source code.
> 
> This is the nature of 'operators' in programming languages. They are
> small and sometimes ambiguous, especially when first encountered. I 
> hinted
> that vertical slice operators may not be needed as they can be acheived
> quite easily using functions, and I'm not sure if there would be 
> significant
> performance benefits if they were built into the language.

I'm generally satisfied to use a function instead. But passing a slice 
of a sequence to a function that manipulates it, creates copies.
I think vertical slicing could provide a noticable speed gain.

Pulling a 1st level column from a dimmed sequence is quite common.


Chris Bensler
Code is Alchemy

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

Search



Quick Links

User menu

Not signed in.

Misc Menu