mamarjan / gff3-pltools

A fast parallel GFF3 parser
MIT License
15 stars 5 forks source link

AttributeValue constructors #65

Open lomereiter opened 12 years ago

lomereiter commented 12 years ago

...and private parse_*attributes methods of Record.

E.g., https://github.com/mamarjan/gff3-pltools/blob/master/dlib/bio/gff3/record.d#L232 and https://github.com/mamarjan/gff3-pltools/blob/master/dlib/bio/gff3/record.d#L246

It just looks strange that whether or not to replace escaped characters depends on whether a string or a char[] is passed. Very error-prone, IMHO. Also, there're a lot of code duplication in these places. I'd refactor them adding optional boolean argument replace_escaped_characters=false (or maybe make this parameter a compile-time one).

pjotrp commented 12 years ago

I agree. The function name should really be describing what is happening.