Re: Yet more on Unicode VCL...
- From: Jolyon Smith <jsmith@xxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 19 Nov 2007 08:39:05 +1300
In article <473d3b98$1@xxxxxxxxxxxxxxxxxxxxxx>, Andrew Fiddian-Green
says...
Craig Stuntz [TeamB] wrote:
Jolyon Smith wrote:
Class helpers aren't even "nice" for classes.
I disagree; without extension methods in C#, for example, you couldn't
have LINQ. Sure they can be misused, but they're very powerful.
Personally I think that class helpers are the best thing since sliced bread.
Personally I have found that home made bread tastes better and is much
better for you. Doesn't come ready sliced though.
:)
Primarily I use them to extend other peoples classes (e.g. components)
without messing with their internal source code.
.... but relying utterly on that source code not to change in such a way
in the future that my helper no longer functions.
If a class cannot be readily derived from then it isn't supposed to be
(or hasn't been well enough designed to do so reliably) and finding ways
around those problems is setting up a different set of problems for
yourself in the future.
This is why I would like to have a string helper; because one could
extend the string beyond things that CG might imagine *without* messing
with System.pas or StrUtils.pas
Oh lawks. Given the amount of compiler support that underpins String,
the LAST thing you want to be doing is extending String in ways that the
compiler could not anticipate (compilers not being known for their
imagination).
;)
--
JS
TWorld.Create.Free;
.
- Follow-Ups:
- Re: Yet more on Unicode VCL...
- From: Jouni Aro
- Re: Yet more on Unicode VCL...
- References:
- Yet more on Unicode VCL...
- From: Andrew Fiddian-Green
- Re: Yet more on Unicode VCL...
- From: Allen Bauer (CodeGear)
- Re: Yet more on Unicode VCL...
- From: Jolyon Smith
- Re: Yet more on Unicode VCL...
- From: Craig Stuntz [TeamB]
- Re: Yet more on Unicode VCL...
- From: Andrew Fiddian-Green
- Yet more on Unicode VCL...
- Prev by Date: Re: Question on redistributing partial of JCL code
- Next by Date: Re: Yet more on Unicode VCL...
- Previous by thread: Re: Yet more on Unicode VCL...
- Next by thread: Re: Yet more on Unicode VCL...
- Index(es):
Relevant Pages
|