Re: Yet more on Unicode VCL...



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;
.



Relevant Pages

  • Re: "%" character in string
    ... If you imagine for a moment that ... Dim i As integer ... is 'read' as a string, at some point, even if it represents code to be executed, it is READ at some point, by the compiler, as STRING to be parsed, then you can also imagine that ... does somehow the same as the compiler, and reject the 'immediate constant from a string' e-val-uation. ...
    (microsoft.public.access.modulesdaovba)
  • Re: Letter to US Sen. Byron Dorgan re unpaid overtime
    ... Big-O notation isn't mathematics per se, it's computer science notation ... "length of the string". ... outrun something compiled and optimized by a good C compiler. ... > either general computing culture or culture outside computing. ...
    (comp.programming)
  • Re: [EGN] Hoisting Loop Invariants (Was: Re: [EGN] Numerical Accuracy)
    ... compiler out there somewhere that did as you claim. ... > the programmer has this knowledge, then the programmer should not use ... >> string in a loop, regardless of the blatant inefficiency of doing so. ...
    (comp.programming)
  • Re: How to convert Infix notation to postfix notation
    ... and make all strings const save where the intent ... function whose contract is to change the string. ... the compiler "just" prevents the string ... try to do using the pointer you get. ...
    (comp.lang.c)
  • Re: PL/I string representations
    ... >> of the language, so it was interesting to me, hopefully it will be to ... I found a workable compiler for Fortran in 1971 (with a bug ... >> The specified length is the minimum, and each time a character ... >> string is assigned to E, the length is stored with it. ...
    (comp.programming)