Re: About speed



"Alex" <zencovich@xxxxxxxxxxxxx> a écrit dans le message de news:
449f854d@xxxxxxxxxxxxxxxxxxxxxxxxx

| Hmm..There is the same whta I ask. Why I need to look deep inside into
code
| to get it work properly? What is benefit? Force me to study Reflector?
Force
| me to get deep understanding in IL code? It is all out of my work I think.
| Your argument seems like - "you cannot write a good application in Delphi
| Win32 if you have not a good knowledge in Asm x86". Sometimes it is
| true..but not for so simple tasks like in code I show, I think. Most .NET
| advantage is using a outer language to process text into internal
language
| (IL) which are the same for all platforms, .NET languages etc etc. But it
| seems like absolutely not true. Some languages a better than others. Is it
| not true?

The point that you are missing in this discussion is that Delphi for .NET is
trying to allow you to port your legacy code to .NET but, in so doing, it is
lulling you into a false sense of security.

Programming for a managed environment is not the same as programming for a
deterministic memory model. There are differences in how you have to write
code to allow for garbage collection.

Unlike in Win32, .NET strings are immutable, you have to consider this
factor when doing long concatenations in loops.

..NET arrays are not dynamic, unless you want to have to re-allocate and copy
an array every time you add to an array, you would move to using the generic
list classes instead.

Unlike Win32, .NET types all derive from System.Object, this then influences
how you program due to overheads involved with boxing and unboxing of value
types. You would not use IntToStr, instead you should be able to call
myIntVar.ToString(), in fact, all types inherit the ToString() method from
System.Object.

You really need to understand that, although you appear to be using the same
compiler, you really are not. The target platform is not just Win32 with a
different library, the Delphi for .NET compiler targets a totally different
memory model and runtime library.

IMO, *good* Delphi for .NET projects cannot be simply recompiled from Win32
source, there are many more considerations that will influence how a progam
is written for a managed environment as opposed to an unmanaged one.

VB programmers underwent a sever culture shock having to move to .NET, after
all, they had never had a true OO language before. At least Delphi has
allowed you to program in a manner that prepares you for the totally OO
environment that is .NET. Even though you have to make small alterations to
your code, most of the class and code structure will remain unaltered.

Joanna

--
Joanna Carter [TeamB]
Consultant Software Engineer


.



Relevant Pages

  • Re: plain vanilla win32 Pascal compiler?
    ... my present view is that a win32 compiler should express the best ... at the first time i was useing FPC, i was looking for an alternative to ... Johns book is real pro when it comes to developing in Delphi, ... 'Windows Graphics Programming: Win32 GDI' by Feng Yuan in Pascal,better ...
    (comp.lang.pascal.misc)
  • Re: Replacing Delphi developers
    ... The choice of first language is critical to the ... It is the foundation upon which their programming ... What is important is not the language itself, ... > Delphi, like its ancestor Pascal, is IMO a very good first language. ...
    (comp.lang.pascal.delphi.misc)
  • Re: The War On HLA
    ... If you're assuming that macros' only purpose is for "in-line" functions, ... languages demonstrate the ability of using macros to extend the language. ... I would ask why you're using Delphi in the first place. ... programming language (i.e., you can assign them to variables, ...
    (alt.lang.asm)
  • Why no language improvements?
    ... I would be doing a lot more delphi ... The language is almost identical to ... Win32 and Kylix releases, you could have eclipsed.net by ... A massive runtime that needs to be installed and even more massive ...
    (borland.public.delphi.non-technical)
  • Re: Looking for BASIC compiler
    ... Programming for Windows started with VB4 and then VB6, ... > It's not that the language itself is that bad, ... > I like Delphi, but would prefer a BASIC solution to no runtimes ...
    (comp.lang.basic.misc)