Board index » delphi » Re: Why the new string "policy" was a bad decision

Re: Why the new string "policy" was a bad decision


2008-05-25 06:08:12 AM
delphi277
"Steve Thackery" <XXXX@XXXXX.COM>wrote
Quote
To me, the biggest threat BY FAR to using Delphi for projects with a long
projected life is the need for activation. CodeGear (and Embarcadero) is
NOT Microsoft. They are a small outfit.
Ethical considerations aside, it probably takes 2 minutes or less to find a
crack on the net. Worst comes to worst, pay a hacker 2 hours wages to crack
it (I'm sure all major Delphi sites will post one hours after the plug is
pulled on Delphi). Activation is a non-issue. If Delphi dies for good, the
investment on codebase that will effectively be lost on the long term is
much more serious.
 
 

Re: Why the new string "policy" was a bad decision

Quote
Ethical considerations aside, it probably takes 2 minutes or less to find
a
crack on the net. Worst comes to worst, pay a hacker 2 hours wages to
crack
it (I'm sure all major Delphi sites will post one hours after the plug is
pulled on Delphi). Activation is a non-issue.
That's a good point. If the activation server disappears, the ethics
questions become irrelevant as far as I am concerned. Wouldn't work for my
employer, though - they have a strict code about that sort of thing.
SteveT
 

Re: Why the new string "policy" was a bad decision

"Rudy Velthuis [TeamB]" <XXXX@XXXXX.COM>writes
Quote

Since the VCL and RTL will mainly be unicode, if you keep on using
AnsiStrings (by switch or explicitly), every communication with VCL and
RTL would mean a conversion and often also a conversion in the other
direction. This could lead to loss of data (Unicode to AnsiString), so
I'm not so sure this is a good scenario.
And of course, if you did have Ansi VCL/RTL like we have now, then a
conversion takes place when the VCL makes a call to the OS. So either you
are 100% Unicode-based, or there's a conversion taking place somewhere. I
guess it is just a matter of picking where, in those cases where you _have_
to use AnsiStrings.
Cheers,
Van
 

Re: Why the new string "policy" was a bad decision

TJC Support writes:
Quote
"Q Correll" <XXXX@XXXXX.COM>writes
news:48388ac3$XXXX@XXXXX.COM...
>
>It is if the new Delphi "string" definition becomes a Unicode
>string.
>
>My druthers would be (have been) for the Delphi Unicode string type
>to be named something like : Ustring, UCstring, UniString, etc.,
>and leave the original "string" the **** alone as it has been.

I'm with you here. it is the same deal as integer. Move from 16 to
32 to 64 bit system, and the meaning of integer changes. After
dealing with that for the 16 to 32 bit change, I created integer
types: I16, I32, U16, U32, etc. for signed and unsigned integers, and
prefer to use those to explicitly specify the type.
Sometimes, that may make sense, i.e. if you must ensure that the size
of an integral type is constant over different versions. Often, it
doesn't make any sense at all. I only use fixed size types where I
must. Otherwise, I will happily use Integer.
--
Rudy Velthuis [TeamB] www.teamb.com
"Never test for an error condition you don't know how to handle."
-- Steinbach's Guideline for Systems Programmers.
 

Re: Why the new string "policy" was a bad decision

TJC Support writes:
Quote
"Rudy Velthuis [TeamB]" <XXXX@XXXXX.COM>writes
news:XXXX@XXXXX.COM...
>
>Since the VCL and RTL will mainly be unicode, if you keep on using
>AnsiStrings (by switch or explicitly), every communication with VCL
>and RTL would mean a conversion and often also a conversion in the
>other direction. This could lead to loss of data (Unicode to
>AnsiString), so I am not so sure this is a good scenario.

And of course, if you did have Ansi VCL/RTL like we have now, then a
conversion takes place when the VCL makes a call to the OS. So
either you are 100% Unicode-based, or there's a conversion taking
place somewhere.
The advantage of using the string type instead of the fixed size
AnsiString is that code will compile under both compilers, Delphi 2007 and
the new Delphi (I assume that will be D2008) without any problems and
without having to "ansify" your code. The OS may convert AnsiString to
an unicode string internally, but the RTL and VCL won't do that, and
these do not necessarily call the OS for everything they do. So any
communication with these will require extra conversions you can avoid
by suing the standard "string" type.
Also, if you use AnsiString throughout, but the default API changes
from ansi to wide, then passing PAnsiString(myString) to a (now) wide
version of the API causes problems I don't want to face, or requires me
to explicitly convert the AnsiString to a unicode string first, before
calling the API. This means more code I must write, which is a big
source for errors (especially since this is something that could easily
be forgotten).
The best way to handle this and many more issues is to avoid using
explicit types, and to use the standard "string" type, which maps to
AnsiString in Delphi 2007 and to the new unicode string type in D2008. In
many cases, you won't probably notice any difference.
--
Rudy Velthuis [TeamB] www.teamb.com
"Mother-in-law = A woman who destroys her son-in-law's peace of
mind by giving him a piece of hers." -- Anonymous.
 

Re: Why the new string "policy" was a bad decision

John Jacobson writes:
Quote
"Tony Caduto" <XXXX@XXXXX.COM>writes
news:XXXX@XXXXX.COM...
>Don't you think we should hold of on any kind of judgment until the
>product actually ships?

What? Here in non-tech? What a heretical thought.


Ya, it seems so :-)
 

Re: Why the new string "policy" was a bad decision

Steve Thackery writes:
Quote
Clearly I am being daft here, but I would love to be enlightened!
Search for posts of blog posts by Allen Bauer on the subject. I
remember him talking about why a compiler switch may cause more
problems than it would solve, but I can not find a link.
--
Regards,
Bruce McGee
Glooscap Software
 

Re: Why the new string "policy" was a bad decision

Only if you use Windows 2000 in this VM.
You cannot move Windows XP (or Vista) around freely.
"Markus.Humm" <XXXX@XXXXX.COM>píse v diskusním príspevku
Quote

you can install it into a VM, then you can move it around freely once it's
activated!

 

Re: Why the new string "policy" was a bad decision

Steve Thackery writes:
Quote
>Only if you use Windows 2000 in this VM.
>You cannot move Windows XP (or Vista) around freely.

Really? Well, that is a show-stopper for me, then. I am going to
start looking for a cracked version of Delphi 2007 so I can keep it safe
somewhere, ready for if/when I need it.
Why, just make sure you have a backup of your slip file.
--
Pieter
 

Re: Why the new string "policy" was a bad decision

TJC Support writes:
Quote
"Rudy Velthuis [TeamB]" <XXXX@XXXXX.COM>writes
news:XXXX@XXXXX.COM...
>
>Sometimes, that may make sense, i.e. if you must ensure that the
>size of an integral type is constant over different versions.
>Often, it doesn't make any sense at all. I only use fixed size
>types where I must. Otherwise, I will happily use Integer.

Understood and agreed. I have 2 situations to contend with. The
first is that I have some software that is a part of a data
acquisition system, and the data packets received contain data that
is of fixed size types (from a Unix-based system) and I have to
ensure that I maintain that format, integers may be either 16 or 32
bit depending on data source, and strings are AnsiStrings.
You exchange Delphi AnsiStrings with a Unix system? Or did you mean
strings that consist of single byte characters?
OK, I will assume the latter. In such cases you MUST of course use fixed
types like AnsiString and your I32 (Longint, in Delphi), etc. But
otherwise, when bitwise compatibility with something else is not
required, I would advocate using "string" and "Integer".
--
Rudy Velthuis [TeamB] www.teamb.com
"Is it not a strange blindness on our part to teach publicly the
techniques of warfare and to reward with medals those who prove
to be the most adroit killers?" -- Marquis de Sade
 

Re: Why the new string "policy" was a bad decision

PavelS writes:
Quote
Only if you use Windows 2000 in this VM.
You cannot move Windows XP (or Vista) around freely.
I think that depends a bit on whether it is an OEM version or not.
--
Rudy Velthuis [TeamB] www.teamb.com
"If electricity comes from electrons, does that mean that
morality comes from morons?" -- Unknown
 

Re: Why the new string "policy" was a bad decision

Rudy Velthuis [TeamB] writes:
Quote
PavelS writes:

>Only if you use Windows 2000 in this VM.
>You cannot move Windows XP (or Vista) around freely.

I think that depends a bit on whether it is an OEM version or not.
Nope, a changed CPU in the host can be enough to change the hardware signature of the VM.
Which in turn triggers the stinking activation {*word*99} to harass you again...
Pre-2007, you were save by archiving your reg***.txt, from what I heard, this is no longer true for
D2007?
 

Re: Why the new string "policy" was a bad decision

Robert Giesecke writes:
Quote
Rudy Velthuis [TeamB] writes:
>PavelS writes:
>
>>Only if you use Windows 2000 in this VM.
>>You cannot move Windows XP (or Vista) around freely.
>
>I think that depends a bit on whether it is an OEM version or not.

Nope, a changed CPU in the host can be enough to change the hardware
signature of the VM.
And yet it is possible. I have an XP Pro VM here that works fine, and I
didn't create it on this machine.
--
Rudy Velthuis [TeamB] www.teamb.com
"One doesn't have a sense of humor. It has you." -- Larry Gelbart
 

Re: Why the new string "policy" was a bad decision

Rudy Velthuis [TeamB] writes:
Quote
Robert Giesecke writes:

>Rudy Velthuis [TeamB] writes:
>>PavelS writes:
>>
>>>Only if you use Windows 2000 in this VM.
>>>You cannot move Windows XP (or Vista) around freely.
>>I think that depends a bit on whether it is an OEM version or not.
>Nope, a changed CPU in the host can be enough to change the hardware
>signature of the VM.

And yet it is possible. I have an XP Pro VM here that works fine, and I
didn't create it on this machine.
But not on a machine in 5 years time, you can'tg o from Intel to AMD or 32 to 64Bit, w/o affecting the
activation {*word*99}ware.
Which is *exactly* his point.
If they were really so stupid to even worsen the situation with D2007+, then he might have to safe a
physical machine as well.
OTOH, I just can not believe that they really did that, making the activations machine dependent that is.
Even for the management that we (almost) all learned to loath, this would seem to go too far.
 

Re: Why the new string "policy" was a bad decision

Richard writes:
Quote
I sure hope that isn't the final deal because I will not be able to
upgrade either.
Richard -- may I suggest that you wait for the actual implementation,
and not make any judgements based on extremely limited information?
--
Nick Hodges
Delphi Product Manager - CodeGear
blogs.codegear.com/nickhodges