C
Chad Z. Hower aka Kudzu
Jon Skeet said:It's not just a T though, of course. It's a TId, an Id, an EId, a
TEvent etc. It certainly doesn't *break* a library, but when mixed with
TEvent is a Borland type - not sure much can be done about that. But they
map to .Net events and you really should not be interacting with them that
I know of. There are a LOT of internals that the end user will never see.
the .NET conventions, it makes for far less readable code, IMO. Don't
forget that you're rather used to the conventions - I'm thinking about
people whose *only* exposure to the Delphi conventions is Indy.
But users are not programming in their own code using these conventions.
Whether its TIdHTTP, or IndyWebClient, its just a class name that Ive
gotten from docs an am implementing.
#2 is solved. #1 I am the most open about changing - but I really need to
be sure that it is necessary.
#3 - Im not so sure about. Open but needs a lot more convincing.
Not if they're in my team they don't![]()
Correctr me if Im wrong, but in MFC C was the standard. CHTTP would be the
class name etc.
Mixing conventions is just a really bad idea, IMO - for one thing the
conventions are a subliminal hints about which language you're using,
so you don't get confused in terms of the idioms to use etc.
..Net is not a language though. C# is, VB is. Developers use their own
conventions in their own code.
MS might name someting BoogerClass. I might call it MucousClass because of
whatever reason - but thats a convention too.
Excellent. That's a big step forward.
Yes. This was going to be a big issue and we knew this.
Unfortunately the other types are still public. Typing "b" then ctrl-
space in VS.NET is still going to suggest "Borland", and in the classes
where the developer has a "using Borland.Vcl.Classes" directive to make
working with TStrings easier, typing "t" then ctrl-space is going to
suggest loads of extra classes.
Nope - You as an end user wont need to use TStrings. See the code I posted.
You COULD use it if you want, but my bet is most .net developers will want
to stick to what they are familiar with. In this case string arrays.
That's good. I hadn't seen that in the article.
Please take a quick gander - its not very long:
I'm sure Indy is big, but IL is generally pretty smallFor the sake
of interest, I'll look into this and come back with the results.
We have dynamnic linked versions, ie Borland stuff in its own packges. I
just recopmiled the dynamic one, its 1.5 MB. Thats JUST Indy. No Borland
parts.
We will be reducing our dependency on some Borland parts, but I dont
suspect it will reduce it a lot unless we do a LOT of ifdeffing in some
units which might be possible if necessary. We only use RTL, not the VCL
parts. And of the RTL, only a limited number of classes, but quite a bit of
RTL system type routines.
Then they should be encouraged to, IMO. If a developer doesn't update
the docs, how is anyone else supposed to? Isn't it just as quick to
write a short note in the docs as to what's changed as it is to write
the same note to someone in the docs team so that they can do it at a
later date?
Its horrible docs. Our doc team diffs and makes changes as necessary.
Besides that, programmers rarely doc, and in open source you cannot MAKE
anyone do anything.
Code folding takes care of this where it's an issue, I find. Indeed,
unless I'm editing a method, I find it's often a good idea to *only*
have the method comment up rather than the method body. If the method
comment doesn't cover everything you need to know, then the comment
should be fixed.
Code folding is new for both Delphi and MS and did not exist before. Indy
is almost 10 years old!
As I said before, I'm sure they aren't a problem at all for you, as
you're already familiar with the convention, but I'm speaking for
myself - and I they lead to a significant reduction in readability as
far as I'm concerned.
TIdHTTP vs HTTP? Yes a different, but think of it as a libarary prefix.
What if it was IndyHTTP? I doubt anyone would complmain then, but it would
be the same exact issue.
If you ever do decide you'd like to seriously consider something to
convert the naming conventions and possibly Delphi type replacement
The types - maybe. We can handle that I think as part of the build process
pretty easily.
The type adaptors - Im less convinced about. Its a hard change, or at least
a lot of ifdefs.
(without your Delphi code having to change), let me know and I'll look
into it. I've looked into the PE and IL file formats a bit, and
wouldn't mind revisiting that work and trying to write a tool which let
you really manipulate assemblies in the kind of ways I've been talking
about. It wouldn't be a small task, but it would have uses way beyond
Indy.
What would this tool do? We can modify source before it goes in as part of
the build process. The adaptor issue would require code changes, something
I doubt your tool could do.
You didnt respond much to #3 after I posted the code. Did you look at it?
Its pretty much pure .net - is that really much of an issue with such easy
adapators?
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"
ELKNews - Get your free copy at http://www.atozedsoftware.com