Board index » delphi » Re: I really hate .NET especially inside Delphi

Re: I really hate .NET especially inside Delphi


2006-10-04 08:47:01 PM
delphi172
Tim Jarvis [Borland/DTG] writes:
Quote
So yes, its different from C#, but the assembly is perfectly valid,
and works just the same as a C# assembly...just has some additional
Delphi unit naming attributes that the Delphi IDE uses is all.
No it does not. It contains all kinds of Delphi Metadata - that all
shows up in VS intellisense and is completely useless and confusing to
C#, VB(Visual Basic) or any other user.
Quote
Also, don't confuse C# and VB.NET with the "usual way .NET languages
implement things" sure these are by far the most common .NET
languages, but there are some really obscure things out there that do
C# and VB.NET are the most compliant .NET languages. Thats one major
reason C# is highly incompatible with C++ and VB.NET with VB.
--
"Programming is an art form that fights back"
www.KudzuWorld.com/
Need a professional technical speaker at your event? See www.woo-hoo.net
 
 

Re: I really hate .NET especially inside Delphi

Tim Jarvis [Borland/DTG] writes:
Quote
feels tacked on....but....and this is a huge but.....It works, and it
maintains code compaitibility with Win32, I bet VB6 programmers wish
Yes, and VB6 guys still wish they could do things like:
string s = 4 + 2 + 1; and get 9, or worse yet in some cases 61.
Quote
Unlike ..ehem.. others ;-) we understand that you (collectively)
probably have a large investment in your codebase, we do not expect or
want you to throw that away, we want a very high degree of
interoperability with Win32 and .NET so that you can have your cake
and eat it too (Delphi.NET has reverse PInvoke for example, can not do
that in C# or VB.NET)
You are completely missing the point that many are making here. If you
wnat to maintain that - fine. Most of us think the point long passed
for opportunity, but at least makea compiler switch. Backwards
compat/emulation and not. Thats not too difficult to do and would
address the major issues.
--
"Programming is an art form that fights back"
www.KudzuWorld.com/
Need a professional technical speaker at your event? See www.woo-hoo.net
 

Re: I really hate .NET especially inside Delphi

Quote
He should be allowed to express his opinions and ask questions in the
manner that conforms to his personality.
He is allowed to do anything he likes. I am just pointing out that I didn't
like it and that I am less likely to do business again with his company.
Quote
I don't think he was being rude at all, the original poster does mention
incompatibilities and bloat without providing examples.
That is true.
It was a combination of Nick's communication style and his different view of
.NET that made me write my posts. I like Borland to at least understand
where I am in .NET and I don't like to be approached like Robert was when I
explain where I am.
Rick
 

Re: I really hate .NET especially inside Delphi

marc hoffman writes:
Quote
And they DO make use of a certain supposedly useless feature:
multiple namespaces in the same file.
How can that be useful for handwritten code?
How a machine stores and reads data is one thing, and the interesting
question is why such a solution was chosen, but the topic was as far as
I understand how humans design and use namespaces and classes and units.
--
Ingvar Nilsen
www.ingvarius.com
 

Re: I really hate .NET especially inside Delphi

Quote
Borland.Vcl.Classes.pas
Borland.Vcl.Forms.pas
Borland.Vcl.Menus.pas
Would I need
1)
uses
Borland.Vcl;
or
2)
uses
Borland.Vcl.Classes,
Borland.Vcl.Forms,
Borland.Vcl.Menus;
--
Pete
Blessed are the geek, for they shall public class GeekEarth : Earth {}
====
Audio compression components, DIB graphics controls, ECO extensions,
FastStrings
www.droopyeyes.com
====
 

Re: I really hate .NET especially inside Delphi

Tim Jarvis [Borland/DTG] writes:
Quote

Ok, to create an assembly that looks and feels like a C# assembly, in
Delphi.NET terms this is a package (yeah, yeah, I don't know why
either, but it is what it is) a Delphi.NET package does not compile to
a BPL it will compile to a dll, in otherwords an assembly.

Hi Tim, actually I think I know what I talk about.
No offense taken and not meant to be offensive, btw. ;-)
I used Delphi 8 for some time until I simply had to give it up. Mainly because I couldn't get the output as I wanted it to be and I
simply got used to the ease of namespaces and multi pass compiling in the time before Delphi learned .Net.
D8 didn't give *me* any advantage over C# (later Chrome), only disadvantages. So why use it? ;-)
However, I checked every new release of the D.Net compiler either using BDS205 personal or Turbo, just to see if things
changed and what was changed.
But judging from threads in b.p.d.l.d.dotnet that camtasia isn't a bad idea, anyway. :-)
Quote
Now say we creat a class in there lets call it TTestClass in the
namesapce TimsTest i.e Unit TimsTest.TTestClass, if you compile this
"package" and have a look at the created assembly with reflector you
will see a namespace called TimsTest with TTestClass in it, if you
reference this assembly in a C# project you simply would reference this
class via TimsTest.TTestClass or put a using clause in i.e. Using
TimsTest, in a Delphi app in the Uses class you would put
TimsTest.TestClass...this is some additional scoping, this is
deliberate, but not an artifact of the assembly, but Delphi, it
actually determines the unit name by reflection...if you look closely
at the assembly you will see a class attribute called TUnitName with
the scoped name passed as a parameter.

Actually, your sample is too oversimplified to show what I meant with unit <>namespace when consuming D.Net classes from
D.Net or from another .Net language.
Simply change your class "TestClass" to be placed in a unit called "RobertsTest.Unit1".
Now I could use it like this in C#:
using RobertsTest;
...
class Blabla : TestClass
{...}
or simply this way:
class Blabla : RobertsTest.TestClass
{...}
A D.Net assembly that consumes the sample assembly with our TestClass had to look like this
uses
RobertsTest.*Unit1*;
type
Blabla = class(TestClass)
end;
You cannot use the namespace inside a D.Net assembly:
uses
RobertsTest;
type
Blabla = class(TestClass)
end;
Using the full path instead of putting the namespace/unit name into the uses clause does not work in D.Net, too. ;-)
Quote
So yes, its different from C#, but the assembly is perfectly valid, and
works just the same as a C# assembly...just has some additional Delphi
unit naming attributes that the Delphi IDE uses is all.

Also, don't confuse C# and VB.NET with the "usual way .NET languages
implement things" sure these are by far the most common .NET languages,
but there are some really obscure things out there that do stuff waaay
differently, have a look at some of these interesting
beasts....www.dotnetpowered.com/languages.aspx

Well, C#, Chrome, VB(Visual Basic) (*cough*), Nemerle, Boo, [most likely a long list of others] do behave that way when it comes to
namespaces and how you use them.
They also won't force you to provide a dcpil besides your assembly.
 

Re: I really hate .NET especially inside Delphi

Chad Z. Hower writes:
Quote

C# and VB.NET are the most compliant .NET languages.

But you *do* know Chrome, don't you?
You wouldn't be able to tell a Chrome lib from a VB/C# lib if you didn't know where to look for differences in how they emit
e.g. more mono-friendly IL than say C#.
Just by using Reflector you won't (as long as the author didn't use class references, of course).
 

Re: I really hate .NET especially inside Delphi

Quote
Yea, solutions. I love the fact I *have* to right-click, set the project
as the default before I can run it. Talk about a time waster.
Not really, you only do that once. In Delphi the project manager will
highlight the last project that failed to compile, so every time you have to
fix something you have to reselect the project you want to run. I
frequently forget to do this and and up trying to run a DLL or something.
Besides, if you intend to insult the way VS runs projects then I feel
compelled to say this. VS not only let's you specify a startup project but
it lets you start multiple projects. So I can write a server, asp.net
webservice, and a WinForm client and when I click RUN I can tell them to
start up in that order. Once they are all running I can debug all three
projects at the same time, I don't believe this is possible in Delphi.
Quote
I also love how when creating a new project, VS requires the directory
name match the project name.
Doesn't bother me at all, but you can rename the folder if you want to.
Quote
I'd go on, but it would be a small book and I don't have the time.

Don't get me wrong, there is a lot I do like about VS/C# (right now,
auto-format and debugging). it is those small things that really irk me.
I like/dislike things about both, and your list will be different to mine.
 

Re: I really hate .NET especially inside Delphi

Quote
Rick, are you seriously saying that we should be writing our language
*compiler* to comply with an Author's (Brad Abrams) application
framework guidelines for reusable librarys? are you winding me up ?
I don't want to force you into something. But Delphi isn't suited very well
to write reusable .NET libraries. I think a lot of component vendors proved
that when they moved from Win32 to .NET they also moved from Delphi to C#.
The main idea is that I and the users of my code get a productivity boost
when I won't be confronted with 2 different sets of guidelines. Why does
Delphi want to promote their own guidelines (T for classes, etc) and
framework (VCL) while the majority is using a different set? That would not
be a bad thing if I could choose, but the set used by the majority is not as
easy to work with in Delphi, so that pushed me away from Delphi.NET
Rick
 

Re: I really hate .NET especially inside Delphi

Chad Z. Hower writes:
Quote
When an average Delphi application can at least be PEVerified, we'll
talk. But even if you leave out ALL of the VCL, many RTL units have
problems, and the forced implicit linkage to Delphi.System remains a
problem.
Umm, ok done...and PEVerified, I can post to binaries if you
like...what do you want to talk about ;-)
Now admittedly this was just a pretty trivial project though it /was/
VCL.NET, but even so I'd have been horrified to get a problem with
PEVerify on such a trivial project...and I am not dismissing what you
are saying, but what exactly do you mean ? are you in a postion to be
specific and identify exactly what causes your problems?
And... Chad, to be blunt I think that we *can* be both sides of the
fence, requirements for an App to pass PEVerify by definition imply an
app that should be written specifically for .NET from the ground up and
frankly are rare, and I'd assume that if you had that requirement,
you would simply write a WinForms app to avoid the issues you are
talking about.
--
Tim Jarvis
Product Evangelist APAC Team Lead (DTG)
 

Re: I really hate .NET especially inside Delphi

Allen Bauer (Borland/DTG) writes:
Quote
There's always room for innovation and improvements. However, I also
want to try and preserve as much of the "spirit and intent" of the
language as possible. It makes for a more consistent and cohesive
story.
Yes, but I argue that .NET *is* very different from Win32 and the real
opportunity in .NET is innovation and improvement, not consistency and
compatibility.
Quote
So far it is been not been that bad. In fact there have been a lot of
folks that have lauded this compatibility.
You have only heard from those that care enough to complain. Many will
simply move quietly to VS.NET for their .NET work.
I'm also quite certain some of those that lauded the compatibility would
praise anything that comes forth from Borland. that is not to say that
this compatibility isn't a good thing, it is.
I just don't believe in hindsight, the sacrifices made for this
compatibility are worth it going forward. And as I have argued before,
there are other ways to solve the "preserve code investment" problem
than porting code to .NET that would have solved your problem of
customer retention/satisfaction.
Quote
OK. that is Nick's bias, which is cool. You have another bias, and
that's cool too.
I agree, I was just clarifying what my reference was. If I had a "with"
statement with a scoped pronoun I'd have used it so your
parser/de{*word*81} would have picked it up unambiguously. ;)
Quote
To me it is like arguing the notion of right-hand
drive versus left-hand drive between the States and the UK. it is a
matter of what you are exposed to and are comfortable with.
Personally, I think left-hand drive is better... is it, really? Tell
that to a British citizen.
I don't think it is like arguing that. We're not talking about
preferences like begin/end and {}.
IMO, it is about looking at the coupling of something logical to
something physical. Does Delphi force you to place each class in a
separate physical file? Java's prescribed directory structure is the
same simply because I think there is unnecessary coupling in the design.
Quote
>If it were better, I believe clean slate languages would have taken
>the same approach that Delphi for .NET did. ISTM, if Nick designed a
>clean slate language, he would take the same approach and I would
>promptly call him crazy.

Good point. However, there's really no way to quantify that.
There is a way to quantify it empirically and anecdotally. If you had a
clean slate what would you do?
Another question: when you guys were thinking about what Delphi was
going to be and pondered "Label.Caption := 'foo';" (or whatever the line
of code was), did you guys think a lot about backward compatibility with
Turbo Pascal? If not, why did you do so with .NET?
IMO, a revolutionary kind of mindset is what I'd have liked to see
Borland have towards .NET. "How can we bring elements of Delphi to .NET
in a rich and powerful way", not "how can we port Delphi to .NET."
The whole porting strategy will *never* work. It didn't work with Kylix
and it is not working with .NET either. And if you guys wanted to bring
.NET to Delphi (and I think you needed to), I contend a mixed mode
compiler is a more natural and powerful solution.
Quote
Hindsight is really nice... :-)
Indeed, and I fully acknowledge that my opinions are formed in
hindsight. Understand that I am not bashing the past at all; what I'm
calling for though is the courage to take some risks now and execute on
a .NET strategy that makes sense using the knowledge gained in hindsight
and through past mistakes.
Quote
>>I just like
>>to challenge folks' assumptions.
>So do I.

Then keep doing so.
As long as I still care, I will. Right now, I do care. In my perfect
world, R&D would advocate radical change and execute a .NET strategy
that has potential of being significantly better than what MS offers;
they would also reread the above paragraph about hindsight and realize
that the worst thing is not making mistakes but not learning or taking
actions to remedy them going forward.
--
Brian Moelk
Brain Endeavor LLC
XXXX@XXXXX.COM
 

Re: I really hate .NET especially inside Delphi

Quote
Right -- you are surprised? Note that I have got no problem with people
preferring the other way. I do have a problem with people saying
"Delphi sucks" because they prefer the other way.
I thought this was only a small part of the complaint. Weren't the other
issues more important (the extra code generated into the assembly to support
units as classes etc)?
 

Re: I really hate .NET especially inside Delphi

Peter Morris [Droopy eyes software] writes:
Quote
>What I didn't like about it, is that "how so?", "what bloat?" political
>nonsense.

But if you provide very detailed and unquestionable answers then the very
fact that Nick has asked you to provide them puts you in a good position to
get a response. Why not produce some C# code and D4DN code and then
provide detailed information about what the compiler generates?


Well, because I *know* that he *knew* what I meant in the first place. ;-)
 

Re: I really hate .NET especially inside Delphi

Quote
but C++ has other ways to deal with resource cleanup,
which fits the C++ object model much better
I'm curious, could you give me an example? :-)
 

Re: I really hate .NET especially inside Delphi

"Nathaniel L. Walker" <XXXX@XXXXX.COM>writes
Quote

"Kevin Frevert" <XXXX@XXXXX.COM>writes
news:XXXX@XXXXX.COM...
>
>Yea, solutions. I love the fact I *have* to right-click, set the project
>as the default before I can run it. Talk about a time waster.
>I also love how when creating a new project, VS requires the directory
>name match the project name.

Since when? I can create a project and move it to another directory, and
run
it without problems. I can create a project, then rename it in the same
directory
(making the names not match) and then run it without problem. I can get a
project
from someone else in a zip file, and then unzip it in a directory that
doesn't match
its name, and run it with no problem. There are ways to avoid having your
project
in a directory that matches its name. /yawns/
Yes, but why am I forced to do it that way? that is my point. MS worked so
hard to force asinine restrictions like that, but fumbled so bad in areas
they shouldn't. We have nine developers here and somehow I became the "VS
goto person" and I can say we spend *way* too much time figuring out where
VS decided to put a file/assembly. Did 'Sally' check out the right file to
the right directory, did 'Jim' check in the correct version from the correct
directory? etc, etc. In my nearly 9 years of Delphi development, I have never
had this much trouble with source code file management.
Other than that, VS rocks. It really does.
Quote
>I'd go on, but it would be a small book and I don't have the time.
>
>Don't get me wrong, there is a lot I do like about VS/C# (right now,
>auto-format and debugging). it is those small things that really irk me.
>

There are small things that irk everyone about every product. That is why
there
is more than one version (1.0, 2.0 .... ....), right?
Exactly.