Hi,

Here are some comments I have on the proposal, in no particular order.


 - Casting bytes to integer types. For example, in following code:

const b: bytes = b"9";
const u = b:uint(8);

will u get value of 9 or 57 (ASCII value of 9)? If former, how could user 
choose the latter cast? Will there be a byte type to accompany bytes type?


 - This might be a stupid question, but why would isDigit, isNumeric and 
isDecimal only work for unicode?


 - Could it be useful to parametrize the find functions so that multiple 
different find algorithms could be implemented, and user could choose which one 
to use? Like:

enum FindAlgorithm { BruteForce, Boyer_Moore };

proc string.find(needle: string, start: int = 1, end: int = 0, algorithm: 
FindAlgorithm = FindAlgorithm.Boyer_Moore ) : int {
    if boundaryChecks then {
        ...
    }
    _find(needle, start, end, algorithm);
}

proc string._find(needle: string, start: int, end: int, param algorithm: 
FindAlgorithm) : int where algorithm ==  FindAlgorithm.Boyer_Moore {
    ...
}


 - Would tighter integration of regular expressions be doable? Like overloading 
replace, find etc. functions with variants using regular expressions.


 - Is the string/bytes internally stored as a dynamic array, ie. does every 
append operation result in new memory allocation or not?
 --> If the backing storage is dynamic, would it be feasible to also facilitate 
prepend operations which wouldn't necessitate a new allocation? And maybe 
in-place trim, replace etc..




26.02.2015, 01:23, "Kyle Brady" <[email protected]>:
>   Hi Chapel Users,
>
>   This is our plan for the future of strings in Chapel from a semantic and
>   library point of view:
>
>   https://gist.github.com/Kyle-B/44138a37907a2a53c4b2
>
>   I still have a few things marked as TODO or not filled in, but the
>   important details are there.
>
>   This document was originally written a few months ago and the team met to
>   talk about it. I think most people are reasonably happy with where it
>   stands now.
>
>   A few of these changes may make it into 1.11, but the vast majority will
>   be in a later release. If you have any comments or concerns I'd be glad to
>   hear them - especially if you use non-ASCII character sets routinely.
>
>   Thanks,
>
>   -Kyle
>
>   
> ------------------------------------------------------------------------------
>   Dive into the World of Parallel Programming The Go Parallel Website, 
> sponsored
>   by Intel and developed in partnership with Slashdot Media, is your hub for 
> all
>   things parallel software development, from weekly thought leadership blogs 
> to
>   news, videos, case studies, tutorials and more. Take a look and join the
>   conversation now. http://goparallel.sourceforge.net/
>   _______________________________________________
>   Chapel-users mailing list
>   [email protected]
>   https://lists.sourceforge.net/lists/listinfo/chapel-users

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users

Reply via email to