Home » Developing U++ » U++ Developers corner » why no virtual destructor for RegExp?
Re: why no virtual destructor for RegExp? [message #38889 is a reply to message #38888] |
Fri, 25 January 2013 16:04   |
|
Hi Navi
IMHO the pattern parameter should not be there, it is kind of confusing and against the whole idea that RegExp object represents the regexp pattern. If you want to have a chance to specify the replace pattern a separate global function might be better for this... It could use the RegExp object internaly, so it's not much work for you 
Quote: |
int ReplaceGlobal(String& t, const String r, const String pattern=Null, bool backref=false); //DONE
int ReplaceGlobal(String& t, const String r, int offset, const String pattern=Null, bool backref=false); //DONE
|
Why not simply int ReplaceGlobal(String& t, const String r, offset=0, bool backref=false); ... and similar for the vector and callback variant. It would make the interface simpler, without reducing its capabilities.
Note: The above is not any official requirement, just my ideas and opinions 
Honza
|
|
|
 |
|
why no virtual destructor for RegExp?
By: navi on Sat, 19 January 2013 06:22
|
 |
|
Re: why no virtual destructor for RegExp?
By: mirek on Sat, 19 January 2013 12:03
|
 |
|
Re: why no virtual destructor for RegExp?
By: navi on Sat, 19 January 2013 12:30
|
 |
|
Re: why no virtual destructor for RegExp?
|
 |
|
Re: why no virtual destructor for RegExp?
By: navi on Sat, 19 January 2013 13:26
|
 |
|
Re: why no virtual destructor for RegExp?
By: navi on Fri, 25 January 2013 14:58
|
 |
|
Re: why no virtual destructor for RegExp?
By: navi on Fri, 25 January 2013 15:01
|
 |
|
Re: why no virtual destructor for RegExp?
|
 |
|
Re: why no virtual destructor for RegExp?
|
 |
|
Re: why no virtual destructor for RegExp?
By: navi on Fri, 25 January 2013 17:37
|
 |
|
Re: why no virtual destructor for RegExp?
|
 |
|
Re: why no virtual destructor for RegExp?
By: navi on Mon, 28 January 2013 07:11
|
 |
|
Re: why no virtual destructor for RegExp?
By: mirek on Tue, 19 February 2013 17:15
|
 |
|
Re: why no virtual destructor for RegExp?
By: navi on Wed, 20 February 2013 00:23
|
Goto Forum:
Current Time: Mon Jun 09 07:14:46 CEST 2025
Total time taken to generate the page: 0.05462 seconds
|