May 17, 2013
Not unexpectedly, there is debate in the Delphi community around strings in the NextGen compiler. Here are some (partial) clarifications.
Not unexpectedly, there is debate in the Delphi community around strings in the NextGen compiler, touching on string immutability, copy-on-write, the loss of the AnsiString type in Delphi's new iOS compiler, and the like. Some sources are:
Before I start, let me clarify that this blog post is not the result of any internal debate or discussion, so it is not an official company position. It does reflect my understanding of the current scenario and it is a direct reaction, after reading some of the posts above (which do contain a lot of insight and good ideas).
Let me start with what I posted as a comment to the first blog entry above:
Very nice roundup about the features and advantages of strings in Delphi compared to other platforms. I agree on some speed loss compared to FastCode, but mostly because we moved away from assembly (given platform portability is very relevant for Delphi today). Also, TStringBuilder can be faster in the scenarios it beats the native memory manager in terms of pre-allocations, something FastMM4 does pretty well on Windows, the native iOS allocator doesn’t seem so smart doing.
Stay assured, there is no plan to change anything going forward unless there is a proven advantage. This is particularly true for immutable strings. They could provide some advantage (for example in heavy multi-threading, when managing string fragments, and in other scenarios)… but will also have disadvantages. At this point there is no definitive decisions on this. Strings in the current Delphi iOS compiler are NOT IMMUTABLE, there is only a warning indicating where things might change in the future. Native might change, not will certainly change.
The last part is key to the debate. The current implementation of strings is still centered around the COW (Copy-On-Write) mechanism, with some really minor differences. And you can change a string in each of the following ways in Delphi for iOS (aka, our NextGen compiler):
Delete(S, 1, 2); // not allowed
Insert(S, 1, 'He'); // not allowed
S[7] := 'T'; // not allowed
I grabbed these three lines from the forum thread. The first and the latter (and their TStringHelper equivalents) are still and will be allowed in the future. The only question is if their performance will stay the same or decrease, which will make sense if most other string operations will become faster. As for the last statement, this triggers a warning in Delphi for iOS (a warning you can disable), indicating a potential future compatibility. This means there is an internal evaluation of truly immutable strings, no decision taken.
We more than welcome input, but better if based on some substance. Immutable strings are used in some languages to help the garbage collector, and that's something we don't need (given we don't have and don't plan adding a GC in Delphi). But they are used in other language that break away from the concept of linear strings (string s= array of characters) and use a concept of string fragments (string = tree of immutable string fragments, potentially shared by different strings). Again, this is just a research area, and there is nothing decided. Unless we prove significant advantages, we won't deviate from the current model.
So getting back to the thread, at one point someone suggested a petition around 4 requests:
- the loss of AnsiString (and single byte Chars)
- that strings may become immutable
- that strings are either 1-based or 0-based
- the re-implementation of RTL functions with rather suboptimal code
Let me comment in the reverse order:
- Improving RTL functions is always a goal. honestly, with fewer RTL functions (and fewer string types) it becomes easier to focus on those.
- For now, 1-based or 0-based is just a local compiler option, not sure if the request is to keep it this way...
- Immutability, as described above, is a potential future, which would be implemented only if there is a proven advantage
- The loss of AnsiString is the most controversial issue. The problem is that it is also the loss of UTF8String. And of AnsiChar. And of using pointers to directly manage character buffers. Which is not really lost, because this is what we are doing internally and suggesting externally. I do understand the request, but it seems to have different implications for different people (and string formats). Optimizing for English language is not a primary goal, as Delphi is used a lot around the world. Improving the management of raw dynamic arrays of bytes storing characters is certainly on the table.
Two more (short) comments related with other complains.
The first is around the fact we are supposedly "dumbing down" the language or making it "Java-like". I really disagree this is the case. Adding features shared by many modern languages doesn't imply dumbing down, but might have the effect of making the language easier to learn and use. Letting the power users go ahead with all the tricks they know of. Cleaning up the large collection of string types goes in this direction. The fact a type is not native implies that an operation requires a function call rather than an internal (magic) function call, but I don't see a huge difference in using a record with methods versus a native type, for any complex operation.
The second is the idea that we should help maintaining the code on very old versions of Delphi. This is quite debatable. We are adding language features across compilers (Delphi ships with 5 compilers today) for platform cross-platform compatibility. Worrying about how to write Delphi code that shines today and still works on Delphi 6 (a twelve years old development tool) would be like asking Microsoft to add WinRT support in Visual Basic 6.
Now having said this we are open to feedback, particularly constructive feedback and suggestions. And would someone want to start an open source project to implement a few cross-platform Delphi string types (AnsiString, UTF8String), I'll be willing to contribute.
posted by
marcocantu @ 10:21AM | 48 Comments
[0 Pending]
48 Comments
Of Strings, Immutability, COW, and AnsiStrings
Marco, thanks for your excelent post. Complaining about
Delphi became a hobby/sport for some people these days.
But your post make it clear how it's amazing that some
people that didn't even try the new compiler are
complaining about changes that didn't even happen yet
(even in new compiler, what to say in 32-bit one) and
making assumptions about the effect on such "no-changes"
in existing applications. Thank you for remember that
strings are still mutable, and you forgot to mention
pointers are also still supported.
Comment by Wagner
[]
on May 17, 12:18
Of Strings, Immutability, COW, and AnsiStrings
1-based or 0-based? 0-based makes more sense these
days (as s[0] isn't the length of a string apart from
ShortString).
Immutable? No. Never. Don't do that. You did a lot of
work hiding Windows-API calls behind nicely named
methods and lots of code and now you're doing the
opposite with strings. Not a god idea.
You need substance? Here it is: I won't buy any Delphi
version then anymore.
Comment by Dennis on May 17, 12:28
Of Strings, Immutability, COW, and AnsiStrings
Greetings Marco,
Does immutable strings mean I can't do this:
MyProcedure(var MyStringArg);
Also, someone wrote recently that immutable strings
helps the language do multi-threading better. Is that
true?
If so, I would be willing to accept immutable strings.
Keep up the good work.
Comment by Keith on May 17, 13:05
Of Strings, Immutability, COW, and AnsiStrings
String fragments/ropes don't prevent mutability,
actually they facilitate it, the "string tree" doesn't
have to be immutable, as it can be under COW itself,
and you can always coalesce upon need.
"Optimizing for English language is not a primary
goal"
English language itself is not the issue, but all
those protocols out there (HTTP, etc.) are based
around ASCII/english, or at least commonly UTF8.
"Adding features shared by many modern languages
doesn't imply dumbing down"
The issue wasn't about the adding, but the removing.
"raw dynamic arrays of bytes storing characters"
For all I care you can dump the various AnsiString &
even UTF8String, provided there is a RawByteString,
ie. an efficient, concatenation-capable, RTL-capable
(search, etc.), copy-on-write byte array.
When handling binary data in a multi-threaded setting,
immutability is important, and TBytes doesn't offer
that, while RawByteString does offer all the above
(COW offers benefits of both mutability and
immutability).
Comment by Eric
[http://delphitools.info/]
on May 17, 13:44
Of Strings, Immutability, COW, and AnsiStrings
"Also, someone wrote recently that immutable strings
helps the language do multi-threading better."
You already have all the advantages of immutability in
multi-threading in Delphi, thanks to Copy-On-Write. And
you have the mutability performance advantages as well.
Comment by Eric
[http://delphitools.info/]
on May 17, 13:47
Of Strings, Immutability, COW, and AnsiStrings
I really appreciate your effort to explain certain
(pending) changes in the Delphi language. Whether it
is a conscious company decision to first announce
changes and wait on the reaction of the community or
if it is a lack of communication I can't tell. But I
think Embarcadero would do good, if they EXPLAIN WHY
they changed something in this way or another. By
doing so, there would be way less FUD around, and us
developers would have way more background information
to discuss the decisions of Embarcadero.
Having said this, I think this very blog post of yours
and your white paper about the XE4 changes are a good
start in that direction. But I think the information
provided could still be some bits deeper - I am
thinking of some older blog posts from Allen Bauer
which explained why things were done in this or that
fashion on a very deep technical level (Hey Allen, I
know you are a busy man, but I am really missing your
posts). So, i.e. what's so secret about the dev teams
internal discussions whether strings should become
immutable or not in the future? Let us know what the
dev team is thinking and who knows, maybe some
contributions from the community may even be helpful
in coming to the right conclusions - after all, it is
Embarcaderos decision. But as it stands we can only
speculate why in the future we will see immutable
strings or not. So, long post, bottom line is: Let us
know what is going on in the brains of the dev team !
Comment by Markus Joos
[http://www.interactive-minds.com]
on May 17, 14:08
Of Strings, Immutability, COW, and AnsiStrings
That's the second time I've seen you advocate for
programmers to step in and provide their own
implementations of UTF8String. You obviously
recognize that it's a useful feature, but apparently
believe that it's good business to push maintenance of
features we've paid you for on to your customers.
Removing AnsiChar/AnsiString/UTF8String doesn't remove
the need for them, it just means that there will be
dozens of incompatible implementations. That's not an
improvement.
Similarly, if you want to make TBytes and friends into
robust replacements for AnsiString, that's great, but
that work should have been done *before* you started
stripping out the existing features.
As for your other comments:
Absolutely *nobody* is complaining about the fact that
you're adding features. We're complaining about the
fact that you're changing or removing features and
making our existing code incompatible with the new
compilers. Removing static arrays doesn't make my app
faster or make it any easier for me to develop.
Having ARC map TObject.Free to ":= nil" instead of
.DisposeOf just changes semantics for the existing
function, which makes it even harder to transition
than it should be.
As for your flippant dismissal of existing code, maybe
you should take a closer look at your surroundings.
The transition to .NET seriously damaged the Visual
Basic ecosystem. Delphi is not bursting with
developers happy to step in to maintain older
libraries. And we, your *customers*, are paid to add
features to our applications, not to spend months
fixing previously working code because you made
changes to destabilize it. Whether you like it or
not, the fact that Delphi has previously been highly
backwards compatible has been a major selling point
for it, and you're breaking that implied contract at
your own jeopardy. Standards compliant Java and C++
code from 2001 will still compile today, yet you seem
perfectly content to break valid code from *2013*.
Comment by Craig Peterson
[http://www.scootersoftware.com]
on May 17, 16:08
What about Linux which is not UTF-16?
I can't see the reason to remove 8 biy string support
as first class type handled by the compiled,
especially since many protocols still uses 8 bit
encoded strings, and Linux default string type is UTF-
8, not UTF-16. It looks to me a loss greater than any
advantage given Delphi apps don't run over a runtime
that shields them from the underlying OS.
Making the Language "simpler" doesn't look to me an
aim that would pay back. It's not because it is
complex that Delphi is not used (otherwise noone
would use C++), it's because it's out of fashion,
losing features won't make it more appealing to new
developers, while it can make old ones switch away.
Even MS abandoned its attempt of "managed C++" and
returned full steam to support "full" C++. Delphi
should be an alternative to C++, not C#, Java,
Python, Php, Ruby, Perl, or whatever.
Comment by Luigi D. Sandon on May 17, 18:29
Of Strings, Immutability, COW, and AnsiStrings
There is a quite easy way to calm down quite a lot of
folks talking negatively about the removal of
AnsiStrings. You even partly mentioned it here:
"Improving the management of raw dynamic arrays of
bytes storing characters is certainly on the table."
But reading "on the table" in this citation means for
me: it has not been done yet, it's only being talked
about. Now, if you'd first provide a vastly improved
TBytes with delete, copy, pos etc. methods _before_
taking away AnsiStrings you could calm folks down. And
even more: I don't see your point to add record based
strings as replacement for something already existing
and tested. I'm quite sure the existing strings and
string functions do have quite a few unit tests. For
any new solution new tests would be required. Do you
really have the time and resources to just recreate
already existing technology in a new technique without
clearly visible benefit?
Yes, it might clean up the language, but "decleands"
the supplied libraries. Is this really better?
=> if you have those vast resources you might just
lend me some of those, I could make good use of them I
guess. ;-)
Comment by Markus on May 17, 19:05
Of Strings, Immutability, COW, and AnsiStrings
I program in the embedded/industrial field and here
AnsiStrings are a must! Nothing make things easier in
comparision to C/C++ than manipulating byte buffers like
strings, typecasting from AnsiChar to Byte and vice-
versa, automagically converting from string to array to
PChar when needed and a lot of other tricks than always
made my life easier. And also low-level communications
(serial or IP) is and will always be made using 8-bit
ASCII.
Comment by Alesf76 on May 17, 19:15
Of Strings, Immutability, COW, and AnsiStrings
Thank you for clarifying.
I had originally the impression that Immutable string
were going to be mandatory, and fully replace mutable
strings. This was imho unacceptable.
"because we moved away from assembly (given platform
portability is very relevant for Delphi today)"
It's acceptable if you leave the opportunity to the
Delphi user to make it by themselves.
This mean provide an inline assembler for all
platform, or at least modify the IDE so an external
assembler can be used.
You have mentionned Fastcode and FastMM on which
Delphi profit a lot, I'm not sure it would have been
coded without an inline assembler.
You don't want a fastcode for ARM processor ???
Comment by Jacques on May 17, 19:15
Of Strings, Immutability, COW, and AnsiStrings
Excuse me, but you are not "adding features". You are
breaking compatibility of 100% of all Object Pascal
code existing today, without any benefit at all. The
decision for 0-based strings would have needed be done
20 years ago. Today it's plain silly.
Mutability, copy-on-write and the excellent string
performance always has been one of the very few actual
language advantages over pretty much all the competition.
This is easy to learn, easy to remember, clean and
nice, and produces fast code:
s1 := s1 + ' ' + s2;
This is hard to learn, hard to remember, dead ugly,
and produces slow code:
s1 := TStringBuilder.create(s1).append('
').append(s2).ToString;
Also, "help maintaing code on very old version of
Delphi" - that's also completely off. Check the Delphi
version survey. A large chunk of users still is using
Delphi 7 - for example me, because I need Linux
compatibility. Do you want to give them an incentive
to finally move to your current offerings and pay you
money, or do you want to give them an incentive to
drop Delphi and move elsewhere?
And: It is about time for Embarcadero that they are no
longer the market leader in the Object Pascal field,
which already is a niché due to how Delphi and the
language got handled the recent years. There are other
players, which have stopped copying most of the
not-so-clever language extensions of the past years.
If you make yourself incompatible with other Object
Pascal compilers, you will no longer hurt the
competition, you will only hurt yourself. It's a
guarantee you'll never get back any users from
FreePascal/Lazarus anymore.
The "we want to attract new users by making our
language look more modern"-stuff doesn't work either.
You are a Delphi book author. You very well know that
*all* of all available literature on Delphi and Object
Pascal in the world teach Delphi Strings. Whoever is
new to the language will learn something to then find
out that you've broken it. This is a terrible new user
experience.
Long story short: In the great tradition of the recent
years, what you guys do *simply does not make sense
business-wise*. You are fractioning the ecosphere you
live in. That's an insane strategy. You should revert it.
And finally a rant about the implementation aspect:
Delphi strings can be implemented in LLVM without any
problems and with good performance. Others have done
it. There is no technical reason for all this. Whoever
is writing your NextGen compiler must either
incompetent, lazy, underfunded or very new to the
object pascal language. Sorry for the harsh words, but
LLVM takes 90% of the work a compiler engineer has to
do. If you fail on the remaing 10%, you should not be
a compiler engineer.
Comment by Simon Kissel
[]
on May 17, 19:30
Of Strings, Immutability, COW, and AnsiStrings
I dont quite understand the AnsiString decision? How can
they just do away with it? What if we still need to
interact with old libraries that only work with
Ansistrings, i had a case like this just today.
I really think they should focus more on what the
developers are asking for rather than what EMBT think
the developers want, the immutable strings are nice, but
i would much rather see EMBT working on fixing the slow
code insight, the unstable IDE and the Android compiler!
Comment by Donovan Boddy
[http://www,dondonprojects.co.za]
on May 17, 19:54
Of Strings, Immutability, COW, and AnsiStrings
> Not unexpectedly, there is debate in the Delphi
>community around strings in the NextGen compiler,
There isn't so much debate as there is me standing
almost alone against everyone else. :-(
A fair debate will acknowledge the points of others;
unfortunately things are still somewhat reactionary
and claims of changes "for no reason" are still being
made. I hope your post helps people to move past that
and discuss the merits of these reasons.
@Dennis
>Here it is: I won't buy any Delphi
>version then anymore.
Dennis, you'd still be able to do essentially
everything you do with strings now, just slightly
differently.
Is typing S := 'He' + S so different from Insert(S,
1, 'He')? You'd rather switch development to a
completely different language? And which language
would that be? Many of the most common languages today
use immutable strings already.
This is why I fail to understand the outrage; on a
development level it would be of minimal impact, and
the rest of the development world hasn't taken out
pitchforks and torches. I hope the case against
immutable strings can be made clearly and with due
acknowledgment of its benefits, because right now much
of it seems to be resistance to change. It's as if
making Delphi anything like other languages is
"surrender", when in reality it will serve to increase
its acceptance and facilitate its use by other
developers who have not tried it before.
A new survey shows less than 25% of developers
spending most of the time with just one language
anymore (I suspect a survey of Delphi users would be
out of step with this). Multiple languages, suited for
different tasks, on multiple platforms is the new
normal. If Delphi "sticks out like a sore thumb"
that's not going to help, nor will it help existing
Delphi users who find themselves needing to code
javascript for a web page, PHP on a web server, etc.
and experiencing "culture shock".
@Keith
>Does immutable strings mean I can't do this:
>MyProcedure(var MyStringArg);
IMHO Keith you really shouldn't do that in the first
place. :-) It decreases readability. Procedures
shouldn't be returning values. If one sees this in the
code:
MyProcedure(someString);
One doesn't know if someString changes or not without
going back and finding the procedure definition. It's
unclear what MyProcedure does. However,
someString := MyProcedure(someString);
makes explicit what is happening to anyone reading the
code. Try not to use a procedure where one really
wants a function. In fact, that's a complaint that can
be made against the standard Delphi string handling
functions themselves, such as Delete and Insert. :-(
Comment by Joseph on May 17, 20:03
Of Strings, Immutability, COW, and AnsiStrings
RawByteString - all I want.
I try port Synapse to iOS and failed because AnsiStrings.
Comment by Radek
[http://delphi.cz]
on May 17, 20:50
Of Strings, Immutability, COW, and AnsiStrings
Some clarifications and some further comments.
1. The definition of Insert() and Delete() have the first parameter as a
“var” param. Regardless of immutability of the string content, the
variables are always mutable.
2. String concatenation (str1 := str2 + str3) will always work. Its
efficiency might increase or decrease... or stay the same.
3. Immutability. Variables are not immutable, these are constants, It is
the specific value they refer to. Example, Integer values are immutable.
You cannot change 2 to 3 (well, maybe with bitwise operations...), you
replace 2 with 3, a different value. Now strings are a bit special about
this and the difference might becomes subtle, specifically when referring
to string fragments/ropes.
4. There is not a single feature being removed by the Win32 / Win64 /
Mac compilers. Some comments about migrating code to newer Delphi
seem to imply that. This is in the ARM compiler. I know, some of the
complains still apply, but when moving from VCL/Win32 to FMX/iOS, I
don't think strings management will be the most complex issue. But I
might be wrong.
5. Given this compiler is new, technically it is not we are removing
anything... we have not added everything. Might sound an excuse but it
is not. Every extra type, every set of RTL functions to manage it, implies
effort in writing and testing to the detriment of other features.
6. Which other language has native types for Ansi, UTF8, and UTF16
strings? Just asking. To my knowledge not C#, not Java, not scripting
languages, not ObjectiveC, not C or C++...
7. LLVM does a lot, but some of the Delphi features (and even classic
Pascal features) are not natively supported and must be implemented. All
can be done, of course, but not everything is easy and free...
8. The white paper I wrote has also some of the why of the changes. Now
the fact some disagree is more than understandable. But there was some
effort to explain it.
9. When reactions to language changes and discussions about it loose
the technical ground and become hyperbolic, people like Allen tend to be
less included to get involved.
10. As noted, I think having the option of an UTF8 type is good. I'm not
100% sure this has to be in the box. Obviously, the more the better. But
again, every feature comes to the expense of another one. I'd rather see
improvements on TBytes, or even better in all dynamic array types (with
insert, delete, concatenation)...
11. ARC I'd rather not get back to, leave it for another blog post.
12. Being backwards compatible, cross platform, mobile enabled, feature
rich, all at the same time is not easy. I hope you can recognize it is a task
similar to juggling... and I agree at times one can loose the perfect
balance... also because the notion of "perfect balance" is different for
each and every customer.
13. Adding featured to existing applications vs. moving them to mobile
are on two different paths to me. I see there is overlap, but not 100%
overlap.
14. Indy works OK on iOS. FireDAC was ported. The both use one-byte
strings. OK, the effort could have been easier, but doesn't seem to have
been out of control. Remy and Dmitry might correct me , here.
15, Didn't I mention we haven't removed a feature from one compiler,
but decided not to add it to another. More and more comment seem to
imply the opposite...
16. There is no problem in using arrays of bytes when talking to APIs. In
Windows, PChar has been around and used forever...
17. "A new survey shows less than 25% of developers
spending most of the time with just one language" that's a pretty good
point. Artificial language differences are an obstacle. The substance of
Delphi, should make the difference and must stay.
18. I could continue...
Comment by Marco Cantu
[http://www.marcocantu.com]
on May 17, 21:54
6. Which other language has native types for Ansi, UTF8, and UTF16?
Thereby you "dumb down" the product removing a great
advantage over other languages? Why Delphi should
become just like any other Language? Why people
should use it when it becomes like any other
Language, especially when "the Others" are much more
widespread and with bigger support?
Or Delphi can differentiate itself from the crowd
(and compiling on iOS or Android is not enough, there
are now a lot of xplat tool for mobile out there), or
it becomes pretty useless. Frankly, Embarcadero looks
like a fly attracted by a bright burning lamp (like
it did with .NET) - the result may just be it gets
burned.
Comment by Luigi D. Sandon on May 17, 22:22
Of Strings, Immutability, COW, and AnsiStrings
would that be? Many of the most common languages today
> 4. There is not a single feature being removed by
> the Win32 / Win64 / Mac compilers.
I really do not understand why anyone keeps makingthis
distinction. You can't simultaneously promote
FireMonkey as a cross platform framework and then tell
us that all of the rest of our code has to be
different. Obviously switching from the VCL to
FireMonkey will be disruptive, but that's an expected
difference. You're breaking code that should work,
and, in the case of XE2, did work on iOS.
There are numerous differences between iPhones and a
desktop computer, but that difference gets a lot more
blurry when you include things like ASUS's Transformer
Android tablets or Microsoft's Surface. Aside from
the UI, there's no reason why our full fledged
application shouldn't work largely as is. Embarcadero
seems to think that "mobile" is a perfect opportunity
to break compatibility, and to me it's almost as
arbitrary as if you'd done it when you introduced
Win64 or Vista support.
> when moving from VCL/Win32 to FMX/iOS, I don't think
> strings management will be the most complex issue.
You're absolutely right, but it shouldn't be an issue
in the first place. Every difference makes it that
much harder to share/port code and makes it that much
more likely that bugs will creep in. You should be
doing everything in your power to minimize those
differences.
> 6. Which other language has native types for Ansi,
> UTF8, and UTF16 strings?
The fact that Delphi has a unique advantage is a *bad*
thing?
> 9. When reactions to language changes and
> discussions about it loose the technical ground and
> become hyperbolic, people like Allen tend to be
> less included to get involved.
Which is understandable, but leaving an information
void certainly doesn't help the issue. There may be
valid technical or business reasons for the vast
majority of your changes, yet your customers appear,
at least from here, to be overwhelmingly telling you
that those changes aren't worth the loss in
compatibility. Without solid arguments from an
expert, a lot of your excuses boil down to "We don't
have the resources/expertise" or "We want new
customers and our existing customers can just deal
with it". If the developers were more visible we
might have more faith in "Just take our word for it",
but you let a lot of experienced people go and at
least some of their replacements are obviously not as
comfortable with Delphi.
> 12. Being backwards compatible, cross platform,
> mobile enabled, feature rich, all at the same
> time is not easy
Well, your existing customers, who've already paid you
thousands of dollars and have millions of lines of
code written are telling you that backwards
compatibility, even on mobile platforms, is important.
Maybe you should make it at a little more obvious
that you're actually listening to them.
Mobile is nice, important, and yes, vital to the long
term health of the product, but not if it kills the
existing ecosystem. You're already late to the party,
and if someone absolutely needed mobile, they'd
already have switched. There's nothing wrong with
taking a little extra time to do it right.
Comment by Craig Peterson
[http://www.scootersoftware.com]
on May 17, 22:54
Of Strings, Immutability, COW, and AnsiStrings
Marco I'm one of those developers who support the
decision to remove, clean, simplify and advance the
language.
The Desktop compiler has not change, they can continue
using it. The new mobile compiler is a different
creature and as such offers a high degree of
compatibility but not 100% with the Desktop
environment. Again, they have not removed anything.
But it is time to make your code more "efficient"
using other techniques.
I imagine EMB can spend a few months, developers and
money to try to provide this feature an delay android
and many other advances just to please a specific
crowd. I say continue.
Delphi has lots to catch up and trying to please the
14+ year old code base will not help to speed things
up.
We are many, but as usual the other group is the noisy
one.
Comment by Mike Rossi
[]
on May 18, 01:35
Of Strings, Immutability, COW, and AnsiStrings
>> yet your customers appear,
>> at least from here, to be overwhelmingly telling
>> you that those changes aren't worth the loss in
>> compatibility.
The vast majority (note, I specifically did not say
ALL) of people complaining about this are the same
people who consistently say complain about every
aspect of Delphi all the time. Seemingly no matter
what is happening. So its difficult to give any
credence to the vast majority of the comments.
As for zero or 1 based strings, sheesh, Marco already
said that there is a compiler option for zero or 1
based strings. Even if there was not, a simple
compiler hint that you are accessing a string by
index to warn you where those are going on so you can
review them will be sufficient. Even all of you who
are so self important with 100s of millions of lines
of code will not actually be accessing string indexes
on every one of those lines. If you survived the
unicode migration, you will survive this.
Personally, I disagree with the self-defeating notion
argued by Craig Peterson (whom I love his products by
the way) that basically amounts to "every developer
who wanted mobile/x-platform/feature x left Delphi a
long time ago for other tools, so don't put anything
new to attract those people". That is such a load of
crap. I would love to have x-platform, mobile etc. It
will take me far less time to change my string
indexes than rewrite in Java followed by a rewrite in
objective C. I presume that Allen, Marcu and the rest
of the crowd would not do these things if there were
not solid technical reasons that allows them to bring
better products to the market faster, as opposed to
the general assumption here that they are just a
bunch of morons who have no idea what their customers
need/want and are making these changes just to spite
their existing customer base.
I just wanted to be another voice in the forest to
tell Marcu et. al. that there is a segment of their
client base who appreciates that they are trying to
extend the language and do what they can. I have
appreciated tremendously the many new additions to
the language in the last few years and agree with the
approach you are taking. I appreciate the
improvements and continued investment being made is
Firemonkey. Would I have liked a perfectly working,
optimized, x-platform Firemonkey on 43 platforms 5
years ago, sure, but I appreciate the EMB has been
sticking with their plan and improving their products
in a consistent manner. It is a nice change from the
pre-Embarcadero days.
Comment by David Novo on May 18, 05:57
Of Strings, Immutability, COW, and AnsiStrings
Marco, some comments on your comments:
4.) I would expect a "NextGen" compiler to at a later
point be also used on Windows. LLVM can be utilized
for much better optimizations. A high-level language
which produces fast native code is a competitive
advantage. Therefore the NextGen compiler should be
100% language compatible to the old one.
6.) Right. That's a *competitive advantage* of Object
Pascal over other languages. You don't kill off your
advantages.
7.) No, it's not easy and free. But you are a tools
vendor. Yes, you need to invest to be able to have
something compelling to sell. And implementing the
full Object Pascal language for LLVM is less than one
man year of work. That's not a huge investment.
8.) Your white paper is great, but it does not
consider at all the business aspects of all this.
10.) Everything that is not out of the box can't be
used by component vendors, and you'll end up with
multiple incompatible implementations. This is not an
option. This has to be provided out of the box.
11.) ARC is OK.
12.) It's also not hard. Embarcadero simply will have
to invest if they wish to increase revenue again. If
you manage to be backwards compatible, cross platform
and feature rich at the same time, you stand a chance
to keep current users, get back past users, and
attract new ones. The numbers of users using
CrossKylix and CrossFPC is several thousands. Produce
something that half of this audience would be buying,
and BAMM you have several Million USD of revenue. You
need to become more attractive than FreePascal. Right
now FPC is more backwards compatible and more cross
platform than your offerings. You need to accept that
challenge.
14.) Several thousand components that you find on
torry.net however won't be ported. Many are not
maintained by the authors anymore, but still
compatible with next to no-change, especially
non-visual stuff. If the end-customer has to port
these themselves, it can be done, but it will be
costy. For the components we use ourselves, I would
have to spend at least something in the area of 50k
Euro on R&D to port them. It's much better if you do
the investment once, keep the language compatible, and
enable your customers to take the advantage of using
existing code. You can not underestimate the value of
the Delphi component market. Business-wise it's a HUGE
advantage over the competition to the users. You have
to accept the fact that the largest chunk of this
business advantage - pre-existing code from third
parties that customers can use in their products - is
stable and proven code that however is no longer
maintained. If you break compatibility, you devalue
this code - and you make it far cheaper for your
potential customers to instead go the FreePascal
route. On the other hand, if you manage to beat
FreePascal, the business advantage of buying products
from you will be far higher than the "but FreePascal
is free" aspect.
Comment by Simon Kissel
[]
on May 18, 11:48
Of Strings, Immutability, COW, and AnsiStrings
This is my idea how to solve this problem
1. Unify all array to be 32/64 bit length
32 bit for string type is in consistent
2. Add COW to all dynamic array types
3. Put back utf8 string type, this is a must
Cheer
Comment by Pham on May 18, 13:49
Of Strings, Immutability, COW, and AnsiStrings
The side effect is that third-party components will
support new compilers with some delay or will not
support it at all.
I wait for example FastReport for iOS (reports
generation, not designer).
There must be a dialog between Embarcadero and third-
party components vendors to ensure major components
migration because Delphi without third-party will not
survive.
Comment by Cristian Peta on May 19, 04:53
Of Strings, Immutability, COW, and AnsiStrings
OS X strings are not fixed to one encoding, or to
UTF-16. Internally, NSString is just a rather abstract
ancestor of several string types. Internally, it can
handle ShortString (yes, the same as in Turbo Pascal),
UTF-8 and UTF-16. Objective-C, being a superset of C,
als has C-style 0-terminated byte-based strings (char*).
AFAIK, the same is true for iOS.
But most of Apple's newer APIs use UTF-16.
Comment by Rudy Velthuis
[http://rvelthuis.de]
on May 19, 11:32
Of Strings, Immutability, COW, and AnsiStrings
Marco,
You ask for input. Mine is rather simple - I accept
the notion that different performance exists in
different environment due to the platform/compiler
differences.
Thus, having a Delete() or Insert() method that
internally changes
Delete(S, 3, 2);
Insert(S, 3, 'He');
S[7] := 'T';
to
S := Copy(S, 1, 2) + Copy(S, 4, MaxInt);
S := Copy(S, 1, 2) + 'He' + Copy(S, 3, MaxInt);
S := Copy(S, 1, 6) + 'T' + Copy(S, 8, MaxInt);
(or whatever appropriate equivalent you choose to use
in the implementation) is not a problem. You will
document how the compiler has changed giving me the
opportunity to re-oode, as appropriate, for where I
might have bottlenecks due to the change. That the
code has a different performance profile is perfectly
reasonable.
However, not providing these methods is where the
problem comes into play.
There seems to be fear that you won't provide
implementations for existing features and the single
best thing you could do to allay those fears would be
to announce that you will do so, that existing code
will continue to compile and run and provide the same
results that they always have, but that performance
might be different and that you will document what
those differences will be and what to look for to tune
code.
You have a very rich tradition of tremendous backward
compatibility. I hope that you can continue to live
up to that ideal as well as you have in the past.
Best Regards,
Emery Galambos
Comment by Emery Galambos on May 19, 16:04
Of Strings, Immutability, COW, and AnsiStrings
C/C++ is so hard to use, especially for new users.
Why there's so many users?
Because of Immutability?
Because of ARC?
Because of No pointer?
I think you make a wrong direction.
Comment by on May 20, 03:57
Of Strings, Immutability, COW, and AnsiStrings
I had hoped i can use a 3D game engine written by
Delphi.Maybe i expecting too much.
Immutability, ARC, no pointer. All of these break my
dream.
Comment by on May 20, 06:43
Of Strings, Immutability, COW, and AnsiStrings
Here's an idea/request. Please make a way to build
and possibly plug into compiler our own string types.
If only we could just sit down and write our own
AnsiString/UTF8String/anything else which would not
suffer in performance compared to native types, I bet
people would be much more willing to accept changes.
In fact, by giving us this, you can safely drop
support for AnsiString while keeping compability
because it will then be provided by 3rd party
libraries. "uses Strings.AnsiStrings" and old code
compiles without problems. "uses
Strings.MyStringClass" and whatever library you're
writing can rely on your own internal strings.
This will make things much easier for everyone. Now
you don't have to support ten sets of functions for
different string types; just choose one, either the
default one or your own, and assume that whatever
string type is passed to you knows how to convert
itself into whatever you're using. Gone will be the
days of ten versions of the same function, heavily
interlined with ifdefs.
In the basic form this shouldn't even be too hard.
The only problem today is that if you implement
string type with records it's about ten times slower
because of Initialize() and CopyRecord() on
assignment. Make sure those are optimized, for
instance, records are copied not by generic function
which looks into rtti, but by generating unique
copying code and possibly inlining it.
In other words that if I have a record of two integer
fields then copying would be just copying two integer
fields by default. Or at least give us the ability to
write the copy function by hand. Same with the
initialization. If only we had fast records like in C
++ how much would be possible. Smart pointers,
reference-counted types, string types, all without
waiting for the compiler to implement it.
Comment by himselfv
[]
on May 20, 13:20
Of Strings, Immutability, COW, and AnsiStrings
David,
You're doing the entire debate a disservice by
dismissing valid criticisms just because you don't
like the messenger. There are prominent members of
the Delphi community voicing well thought out concerns
about the changes to the language, and their opinions
aren't invalid just because they happen to align with
those who are considered the "negative" critics.
The issue with 0 based strings has nothing to do with
whether we can just turn it off and ignore it, and
it's not because we think 1-based strings are
inherently better. If strings had been 0-based to
begin with, it wouldn't be a problem. It issue is
that they're changing it well after the fact and that
there will be a mix of functions within a single
application that handle it one way or the other. You
can no longer look at a piece code that manipulates
strings and *know* how the string is being indexed.
Any function that accepts indexes now needs to
document which indexing mode it expects. Those are
significant issues to introduce for relatively little
benefit.
Also, I absolutely did *not* say "Don't put anything
in to attract iOS developers." I said "Anyone who
absolutely *needed* mobile" is using something else,
which is true, and that there is therefore time to do
things right. I want iOS and Android support too, I
just don't want them to screw it up because they're
recklessly racing ahead, leaving us to work around
design issues for years to come. I also strongly
disagree with the notion that those iOS/Android
developers are avoiding Delphi because of the
language; they're not using Delphi because it doesn't
have any compelling advantages for them. If/when
FireMonkey lives up to its promise, that will change,
regardless of ARC, multiple string types, or "with".
Comment by Craig Peterson
[http://www.scootersoftware.com]
on May 20, 20:44
Of Strings, Immutability, COW, and AnsiStrings
Marco, and TeamB!
Do not touch strings' implementation. U will get no
money from that, except money loss.
Guy who proposed that deserves to be fired, i opine,
for not understanding Delphi way.
If Delphi becomes similar to C#, or Java, I will
rather use latter.
Do something useful instead: add TRUE Windows 8
Appstore application development,Android compiler,
LLVM Delphi backend, etc, whatever.
But do not do such stupid things.
--
regards
Comment by DevAlek on May 21, 08:35
Of Strings, Immutability, COW, and AnsiStrings
> 15, Didn't I mention we haven't removed a feature
> from one compiler, but decided not to add it to
> another. More and more comment seem to imply the
opposite...
That decision brought up some questions indeed. Why
would you remove (not add) feature from one compiler
if you are not planning to remove it from another.
Do you think that adding obstacles to your existing
customer base will encourage them to use your mobile
compilers. No, in fact it will encourage them to seek
other solutions for other platforms too.
The whole advantage of Delphi for mobile lies in
possibility to reuse existing code. Mobile apps will
be based on a lot of new code, but also on plenty of
old code that whether you like it or not uses 8-bit
strings. If two compiler diverge more than necessary
you will lose that advantage.
It is about ability to trust your tool makers that
they will listen to their customer needs, and if
nothing else that they will not just cut features out
when they feel like it.
Changes in strings bring zero benefits to your
existing customers, only a lot of trouble. If and
when you have to introduce breaking changes they can
be accepted if benefits are greater than losses.
ARC has potential to resolve more issues than it
would create new ones (at least in my code), but
nobody can argue that removing 8-bit strings brings
any benefits.
Comment by Dalija Prasnikar
[]
on May 21, 09:06
Of Strings, Immutability, COW, and AnsiStrings
If I have to write mobile code in a different way as I
write currently for Desktop applications (memory
management, string index, ...), I will learn a
different language.
FMX had great potential, but the current
implementation points to the wrong way.
Why are there so much string based commands, and so
much RTTI stuff? It makes refectoring really hard. As
Eric often posted: Why does Delphi not use the
compiler more, for static checks?
In my point of view, once the VCL begins to be
outdated and FMX is the only framework EMB is
maintaining, I am going to switch to .Net (Oxygen).
Because the current design of FMX is bad. Also the FMX
Style designer (XE4) is a joke. With the removal of
the default vector based styles, the great feature
"scaling" became also usless.
If Lazarus would have so much 3rd Party components I
would switch immediately. I am waiting for DevExpress.
Fast-Report is already moveing ;)
Comment by Markus Ja on May 21, 13:13
Of Strings, Immutability, COW, and AnsiStrings
> 5. Given this compiler is new, technically it is not
> we are removing anything... we have not added
> everything. Might sound an excuse but it is not.
> Every extra type, every set of RTL functions to
> manage it, implies effort in writing and testing to
> the detriment of other features.
I let this slip earlier and shouldn't have. Marco,
this is disingenuous and you know it. The effort to
remove AnsiString support and migrate all of
Embarcadero's existing code to the unified string type
and marshalling interfaces was not trivial. That
effort could have been instead directed towards
maintaining the existing feature set. So yes, you
*did* remove features, rather than just "not adding" them.
If you were curious why I'm no longer willing to
accept "Trust us, we know what we're doing", it's
statements like this and "ARC is required for mobile
support." Neither is true, but you say them because
you know that the real reasons aren't compelling
enough on their own. Given the number of people who
will obviously accept your arguments at face value, I
can certainly understand why you stick with them, but
I personally find it extremely distasteful.
Comment by Craig Peterson
[http://www.scootersoftware.com]
on May 21, 16:00
Of Strings, Immutability, COW, and AnsiStrings
Just wanted to add a comment for Craig and others, I don't think I've said
these changes are required for ARM (specifically on the while paper I
spend quite some time indicating all of the reasons behind the various
decisions, which include advancing the language in some areas).
Specifically memory management is an issue for small devices and is an
issue for developers coming from other languages.
In terms of not having some of the Win32 features on ARM, I'm not
defending this against all odds, in fact we are considering how to help
developers better. But someone mentioned we put an effort and spent
time removing features, which is clearly not the case because we have
been building a new compiler and RTL and retesting it. That's the context
for that statement, I might have not been clear.
The more features you include, the more effort it is. I'm not saying that
effort is not worth, but that there is an effort involved.
-Marco
Comment by Marco Cantu
[http://www.marcocantu.com]
on May 21, 16:54
Of Strings, Immutability, COW, and AnsiStrings
I am not opposed to advancing the Delphi language at
all. Similarly, I don't believe that maintaining
backwards compatibility with Delphi 6 should be a
priority. However, I believe that Embarcadero's
implementation of it's goals is all wrong.
From my perspective, it seems that most Delphi users
have been using Delphi for a very long time, and you
would have to pry Delphi from their cold, dead hands
to get them to give it up. That being said, such
types of people don't typically welcome change, and
you will certainly lose customers by making
significant changes to the Delphi language.
Changes *can* bring in new customers, and such changes
could be a great investment toward the future of
Delphi. However, appealing to new customers is
exactly where Embarcadero is failing. Delphi just
isn't very appealing to new customers, and it's not
because of 1-based strings.
It's hard for a newcomer to learn Delphi. The best
Delphi books are more than a decade old, and they
contain so much deprecated information. Not only does
the lack of books make it difficult to learn Delphi,
but it makes Delphi look bad. From an outside
perspective, Delphi looks like it died many years ago.
Most of the books that have come out since 2006 are
self-published, terrible, and overpriced. Delphi's
documentation isn't really that great, and there is
some confusion caused by the fact that many deprecated
components are kept around for compatibility purposes
but not labeled as such in the documentation. For
example, how is a new developer supposed to know if
they should be using TServerSocket, TTcpServer, or
TIdTCPServer? And mentioning Indy, Delphi's reliance
on bundled third-party stuff causes issues.
If Embarcadero is going to rely on Indy being the
standard platform for socket programming, then they
need to pay somebody to write some documentation and
demos for it, because Indy's documentation is utterly
ridiculous. It is way too hard to find any Indy demos
that actually compile, and it's equally hard to find
any guides, tutorials, or documentation about Indy
that are actually useful and relevant. The same goes
for Intraweb. Maybe Intraweb is awesome, but I'm
scared to even touch it. Atozed's website is so
ridiculously riddled with misinformation and dead
links that I find it difficult to trust that their
software isn't equally buggy.
Supposing that I wanted to take up C#, I could
download a free version of Visual Studio in which to
practice and learn the language, and I could choose
from a mountain of reasonably priced books that cover
the latest version of .NET. I also would have a vast
framework with almost any capabilities that I needed,
already built in.
In contrast, supposing that I were a developer that
wanted to learn Delphi...I would have to buy several
antiquated books and try to piece together the parts
of each book that is still somewhat relevant. I would
have to do vast amounts of experimentation with real
code to figure out what is deprecated and what isn't,
and I would have to do this on an IDE that is *not*
free. Even then, there would be newer features of
Delphi that I probably wouldn't even be aware of.
Then I would have to dig through mountains of
third-party libraries and frameworks (most of which
are no longer maintained and would require
alterations) just to get functionality that is
considered basic in some other languages. And this is
just if I wanted to learn to use the VCL. If I wanted
to use FMX, I would be screwed. Those third party
libraries would not work, nor would the techniques
that I learned from my out-dated books.
What Embarcadero needs to do is hire some authors to
get some modern books out (including entry-level
books), ASAP. They also need to either drop Indy and
make their own socket library actually be good, or
they need to write some documentation and demos for
Indy, because the Indy team can't manage to do so.
Then they need to make the Starter Edition version of
Delphi be free, like Microsoft's products. It also
would be a good idea for Embarcadero to help some of
the third-party developers port their components over
to Firemonkey, because the lack of those is what's
keeping so many people stuck on VCL. All of these
things should take priority over further development.
I'm actually fine with shedding off some of Delphi's
extra baggage and moving toward the future. However,
there *will* be lost customers in the process, and
right now, the proper steps haven't been put into
motion to actually attract new customers.
Comment by Roy McGibbons
[]
on May 21, 17:59
Of Strings, Immutability, COW, and AnsiStrings
The competitive advantage of Delphi has always been about the
component ecosystem (VCL/FMX and Third Party). PERIOD.
Embarcadero has benefited by the thousands of features added by
this ecosystem basically for free (to them) for their customers, except
for supporting the language features and component hierarchy every
release. The competitive disadvantage of Delphi has always been lack
of cross-platform support (not GC, syntax, or anything else). I
applaud Embarcadero's move to cross-platform/mobile. However,
Embarcadero's priority should be maintaining their competitive
advantage while addressing their competitive disadvantage. While
extremely unfortunate, having to move from Vcl to FMX was at least
understandable for cross-platform *visual* components (if only FMX
was as mature and well thought-out when it came out as Vcl was
when it came out :-( ).
However, the non-visual components and code should not break
because Embarcadero is moving to mobile. Breaking that breaks
everything that depends on them. Removing classic Delphi
AnsiString/UTF8String support and SYNTAX (and Marco, it is
removing. Your customers do not give a damn what compiler/linker
you use. Embarcadero chose to go with LLVM - it is their problem to
make it be compatible) is a grave mistake. Embarcadero will cripple
their component ecosystem and lose a lot of old customers (through
loss of third-party/open source/free component support) in order to
gain supposedly some new customers.
I can tell you as a third-party component developer that I am getting
tired of fixing code for each new version of Delphi. I want to work on
new features and fix my own bugs, not work around Embarcadero's
latest compiler/component changes. My worst fear is this will turn
out like the Vcl.NET clusterf*ck - I changed a ton of code to support
that, the customers never came, and then it was dropped like a hot
potato. If Embarcadero drops AnsiString/UTF8String support, I will
need to do a considerable amount of work. At this point, the
customers have not showed up for crossplatform yet; my ROI for
supporting some arbitrary Embarcadero compiler changes at this
point is depressingly low. And with Embarcadero going to an
accelerated release schedule, it sounds like I will be doing this more
and more often.
BTW, the 0 vs 1 indexing I don't care about as long as there are
compiler switches. Immutable strings vs COW sounds like a stupid
change but I don't care as long as the syntax does not change and the
performance doesn't suffer too much (which, unfortunately, it sounds
like it would)
Comment by Thomas Grubb
[http://www.RiverSoftAVG.com]
on May 22, 14:35
Of Strings, Immutability, COW, and AnsiStrings
@Roy McGibbons: Can you please point me the broken
links or misinformation in Atozed web site? Of course
you may find some issues, but most outdated
information references old IntraWeb versions and/or
old Delphi IDEs. We can't remove that information -
like many software providers do when they release a
new version- because many users still need it.
We DO support 10 (yes, TEN!) different Delphi IDEs,
with 4 different IntraWeb versions, Unicode and pre-
Unicode.
Can you please point me one single web framework
developer/provider supporting 10 different IDE
versions? Do you know any ASP.NET component developer/
provider still supporting .NET 1.1, or even 2.0???
Yesterday, my old Windows 2003 server crashed. I
desperately needed some information in
support.microsoft.com. During my research I found at
least 4 broken links in that site. Does it mean that
ASP.NET is also buggy?
We DO spend much more time programming and improving
IntraWeb than reviewing the site content, that's a
fact. I'm not saying that the site content is not
important. It is. But you can't judge the quality of
the product based on a few broken links or old/
outdated content.
Comment by Alexandre Machado
[http://atozed.com]
on May 23, 00:28
Of Strings, Immutability, COW, and AnsiStrings
@Alexandre Machado
I was curious and had a look at your website and
first link I clicked didnt work:
http://atozed.com/IntraWeb/Documentation/Index.EN.aspx
Click at "IntraWeb Documentation" link.
Comment by on May 23, 09:14
Of Strings, Immutability, COW, and AnsiStrings
Yes, this link is broken, thank you. We are moving ALL
our docs to a new system. You can already see it here:
http://ww2.atozed.com
Comment by Alexandre Machado
[http://atozed.com]
on May 23, 11:57
Of Strings, Immutability, COW, and AnsiStrings
@Roy McGibbons - if you're reading this, would you be
able to expand (maybe in private) on the books point?
E.g., what you consider to be a good old Delphi book,
and your criticisms of the more recent ones. I'd be
grateful if you could.
Comment by Chris Rolliston
[http://delphifoundations.com/feedback/]
on May 26, 16:32
Of Strings, Immutability, COW, and AnsiStrings
I agree with you, simplify things and give us back our
binary compatible Delphi 2..7 8bits string !
Keep only (RawByte)string and UnicodeString with full
support of both (Copy, Pos, COW, Replace, Insert...)
why should we use a array of byte to handle AnsiChars
? I'm french, I do not limit myself to English chars,
but I don't care about codepage with my french clients
!
you want to add a immutable string with a
stringbuilder ? go ahead with a TStringBuilder and a
TString object that doesn't bother us !
type
TString = class
constructor Create(); overload;
constructor Create(Str: AnsiString); overload;
constructor Create(Str: UnicodeString); overload;
function AsString: AnsiString;
function AsString: UnicodeString;
procedure concat(Str: TString);
end;
If a platform doesn't allow to handle AnsiString like
it should be, you can fall back on nasty code like I
did in my FashPascal compiler
"s[x] := 'a'" compiles as "s := Copy(s, 1, x - 1) +
'a' + Copy(s, x, MaxInt)"
Just add a warning on that platform like you did for
CharInSet but let the old style code compile !
Anyway, if the Delphi compiler can't handle
AnsiString, how should we do it with TBytes ?!
Comment by Paul TOTH
[http://www.execute.re]
on May 27, 06:55
Of Strings, Immutability, COW, and AnsiStrings
@Alexandre Machado: Hello. First, I would like to
apologize for attacking Atozed, in such a harsh
manner, in my previous post. I should have found a
more political way in which to express my thoughts,
and I should have backed up such accusations with real
evidence.
In truth, I had not examined Atozed's website very
recently prior to my comment, and I just made that
comment based on memory. I don't remember the
specific instances of dead links or misinformation
that left me with such an impression of Atozed.
However, upon briefly perusing your website, in order
to answer your question, I have come up with a few
examples for you.
Aside from the documentation link that somebody else
mentioned a few days ago (documentation is a pretty
important link to keep alive, just fyi), there are
certainly some other things that could use some
attention. For example, if you go to the 'Indy in
Depth' page, and try to click on 'Indy tech support
page,' it is a dead link. On a similar note, I
suspect that 'Indy in Depth' is probably deprecated.
I haven't purchased it to find out (because I'm scared
that it will be a waste of money), but I doubt that
the information in the book is still accurate. If
that is the case, then not only does your website
contain misinformation, but you are actively trying to
sell misinformation. Also, it's not particularly easy
to tell, from your website, what the difference is
between IntraWeb XIV and IntraWeb XII. On a similar
note, multiple sections of your website (one of them
being the 'What's new in IntraWeb' page) actually seem
to indicate that IntraWeb XII is the newest version
and that IntraWeb XIV doesn't even exist. Also, the
new ww2 website that you have linked to contains a
typo on the very first page.
I understand that programmers are not web designers
and that they often have other things on their mind
aside from tending to websites, and that is why I gave
you guys the benefit of the doubt in my original
comment and said that IntraWeb might be awesome.
However, the rest of my comment still stands. You
said that I can't judge the quality of the product
based on a few broken links or old/outdated content,
but that isn't true. I can and I did. It might not
be the right thing to do, but it is what happens.
Humans, in general, have a tendency to judge things
based on their outward appearance. Suppose that you
were going to an important business meeting. Would
you show up at that meeting wearing jeans and a white
undershirt with mustard stains on it? Would you show
up to that meeting without taking a shower or combing
your hair first? I would hope not, because the people
that you were meeting with wouldn't take you
seriously. You would do much better to show up with
your best suit and tie. If you don't tend to your
outward appearance, people will often make inferences
about your competency. It might not be right, but
it's what people do.
Atozed might be an online business, but the same basic
rule still applies. However, since you are an online
company, your website is all that we see. Your
website is the face of your company. If you don't
tend to it, then people *will* make negative
inferences about your products before they ever even
try them. I suspect that this is even more true in
your case. You're trying to sell a web
framework...don't you think that it might be easier to
sell a web framework via a more impressive website?
You might see this as "a few broken links or
old/outdated content," but a prospective customer
might see it differently. They might see it as
"IntraWeb XIV has been out for a year and these people
still haven't even found time to mention it on the
'Whats new with IntraWeb' section? How do I know that
they can find the time to ensure the security and
stability of the product if they can't even take ten
minutes to mention that it exists." In such a case,
that ten minutes of your time is better spent updating
your website than improving your product. It doesn't
matter how good your product is if people are scared
to use it.
In making these comments, I truthfully am not trying
to be mean or rude. I really like Delphi, and I would
like to see Delphi flourish and regain the popularity
that it once had. As IntraWeb seems to be a part of
Delphi, I also would like to see IntraWeb flourish.
That being said, I am making these comments because I
really feel that the issues that I have described are
both detrimental to Delphi and to Atozed.
Comment by Roy McGibbons
[]
on May 28, 07:35
Of Strings, Immutability, COW, and AnsiStrings
@Chris Rolliston - I was out of line by knocking
self-published books without offering an explanation,
and I was incorrect when I said that the best Delphi
books are more than a decade old. I have read many
sections from your book, and I feel that your book is
one of the best of its kind. On the same note, I feel
that your book is well worth the money that you charge
for it.
The reason that I referred to self-published books
with a negative connotation is not that self-published
books are necessarily bad (as your book certainly
demonstrates). Rather, self-published books are
rarely subject to the level of editorial scrutiny that
professionally-published books are, thus they hold a
greater potential for being erroneous or unreadable.
The higher risk can sometimes put people off. I
personally, have felt pretty ripped off after
purchasing some of them. One time, in particular, I
paid like $120 for an IntraWeb book that was like 130
pages. It was basically useless, and seemed to cover
no more information about the product than standard
help documentation should. The book has since been
updated, and might be much better, but I've never
bothered to find out. However, Delphi XE2 Foundations
is not among the books that I had in mind when I made
my negative comment.
My biggest issue with the more recent books about
Delphi is simply that there aren't enough. The latest
books, including yours, are about Delphi XE2, which is
two iterations past. Furthermore, none can serve as a
stand-alone "getting started with Delphi" type of
book. Your book, for example, as thoroughly as it
explains many of the non-visual aspects of Delphi,
doesn't really touch on the visual aspects too much.
I think that we could both agree that a person with no
previous Delphi experience would have a very difficult
time using your book as a sole source of information
to just start cranking out Firemonkey applications. I
feel that Delphi needs current books for people of all
experience levels. Delphi needs books that assume no
previous programming knowledge all the way to books
for veteran programmers. Delphi needs books that show
how to effectively use Firemonkey, as well as books
that show how to effectively use Delphi's bundled
products such as Indy and IntraWeb.
As I mentioned, the general lack of books looks really
bad to anybody who is looking into learning Delphi.
Aside from the fact that the lack of books makes that
a very difficult task, it literally makes Delphi look
dead. When you search for Delphi books on Amazon and
most of the results are from the '90s or from the
early 2000s, it looks like Delphi is either not being
developed, has had no significant enhancements in the
past decade, or is not a useful language. None of
those are good things when it comes to attracting new
Delphi customers.
Comment by Roy McGibbons
[]
on May 28, 08:29
Of Strings, Immutability, COW, and AnsiStrings
I don't hear anybody complaining about AnsiString and
related functionality. I hear a lot of people
praising COW. Personally, I only use AnsiString,
WideString and char* so I fail to see why things must
be changed in order to jump on some short-lived
bandwagon or other. Delphi is changing into something
so different from the original, that it fails to
attract me any longer! I wonder how many others feel
the same way - if it ain't broke, don't fix it!
Comment by Mark Jacobs
[http://jacobsm.com]
on June 25, 12:58
Of Strings, Immutability, COW, and AnsiStrings
One point I would like to make is that lots of hardware
communicate using a serial interface (today often using
serial-over-USB interfaces), and this communication most
often uses 7 or 8 bit strings. I would like to be able
to do that using a comfy 8-bit character string type.
Comment by Christoph Kögl on July 15, 10:06
Of Strings, Immutability, COW, and AnsiStrings
No mistake, Unicode was necessary for a product like
Delphi. But the way embarcadero decide to implement
it’s questionable! Indeed they decide to migrate the
8bit string to 16bit string instead of choosing to
implement Unicode through 8bit string (UTF8). This
cause the migration of some Delphi app < d2009 very
hard, especially on application that assume that
string is 8bit. Here a very good article about why to
avoid to use UFT-16: http://www.utf8everywhere.org/
So I was facing the need to choose: stay in D2007,
move to freepascal (that implement Unicode through
UTF8) or migrate to Unicode. After studying the
Unicode migration and discover that it’s will be very
hard to do (even in the Delphi I discover some bugs
in their own source code due to the migration from
ansi to Unicode like for exemple
http://qc.embarcadero.com/wc/qcmain.aspx?d=106424).
Also on lot of my applications the migration to
Unicode was really unnecessary, as they was already
working in UTF8, receive their input request in utf8
and output their response in UTF8. Here the migration
to UTF16 will mean: Input (UTF8) => UTF16 => data
processing => UTF16 => output(UTF8) + off course all
the migration job (that include debugging). In fact,
except the input/output to the "visual interface",
most (if not all) of the input/output of most of the
application will be done in 8bit string (ex: file
storage, client/server protocol, HTTP, Smtp, tcp,
xml, html, database, etc.). So I decide to go in
Delphi Xe2 but to stay in ansistring (8bit string).
My first through was to replace everywhere in my code
all the String by AnsiString. Unfortunately, most of
the usefull and needed string function in D2009+ are
not available in 8bit string like inttostr, strtoint,
strtofloat, Tstrings, TstringStream, etc. that simply
unbelievable, in their way to go in 16bit string,
embarcadero remove the 8bit support ! of course we can
still do ansistring(inttostr(x)) but this is very
pity (and slow).
Now what next ?? no more ansiString at all? zero based
string (kidding) ? Imutable string ? tss tss the guy
(few) that survive to the d2009+ migration will died
now for sure
Comment by loki
[http://us.arkadia.com]
on January 2, 11:55
Of Strings, Immutability, COW, and AnsiStrings
I'm trying to maintain compatibility with some
existing file formats that that use fixed length
records with lots of ansi strings and single byte
chars. So it would be a lot easier if I could still
use those variable types.
Comment by Ray White on January 14, 19:36
Of Strings, Immutability, COW, and AnsiStrings
As a Delphi developer for far over a decade, I can
only say that removing any standard features from a
language is inviting big trouble for the future of
that language. Let's not follow Microsoft's footsteps
and remove things that people still use. And it's not
about English being a primary concern or not - it's
about the huge number of software applications out
there that does use English and about standards like
JSON (used in YouTube API for example), etc., that
use single-byte characters. Yes, add the support for
other languages via Unicode and UTF8, etc., but don't
remove what is used everywhere - there's no reason
to. I always considered Delphi a serious contender
for C/C++ because you can go low-level right up to
inline assembler, etc. It's just the few cases of
device drivers and such applications that Delphi
can't handle. Let's not start spoiling that
reputation of Delphi. Keep Delphi powerful at all
levels; not just high-level applications.
Comment by Jannie Gerber
[]
on October 2, 13:47
Post Your Comment
Click
here for posting
your feedback to this blog.
There are currently 0 pending (unapproved) messages.