I Use C# at Work and Still Prefer Delphi [Edit]

I've been using C# and Visual Studio at work, but I still keep coming back to Delphi. Here what I think Delphi has over C# and VS.

Some features I prefer/need:

sets and set operations
virtual constructors
deterministic and virtual destructors
virtual static methods
messaged based method and DefaultHandler
implementation through delegation
assign and assignto
property promotion
published section
access to source code examples of property editors, component editors, experts, design time support
full library source code 
interface and implementation sections
design time binary/string properties, easy support to stream to/from dfm
class types
global level procedures and functions
block declarations
better com support
better windows api support
better visual control library
both graphic and windowed controls
onevents rather than method sounding events (click in c# vs onclick in delphi)
native code, no runtimes
asm, mmx, sse, sse2, sse3

Importantly from above *organization*

Block delcaration and interface/imeplementation sections really make a difference in organizing code. With the interface section I get to see the outline of the class/types, and with block declaration I see everything organized in a strict order.

<div style="white-space: -moz-pre-wrap; white-space: pre; line-height: 0.5em">
class
  private
    field
    field
    field
    method
    method
    method
  protected
    method
    method
    method
    property      
    property      
    property      
  public
    constructor
    destructor
    method
    method
    property
    property
    promoted property
    promoted property
    promoted event
    promoted event
</div>

I love the above. Delphi forces you to place fields before methods or properties. Delphi does not put the implemenation and declaration together, C# is nowhere near this organized. C# is a bunch of implemenation code rolled into declaration code, usually appearing in no organized pattern (ie.e things come in any order). 

With C# you cannot block declare things such as:

<div style="white-space: -moz-pre-wrap; white-space: pre; line-height: 0.5em">
const
  WM_A = WM_USER;
  WM_B = WM_A + 1;
  WM_C = WM_B + 1;
  WM_D = WM_C + 1;
</div>

Regarding class types, you can't do this in C#:

<div style="white-space: -moz-pre-wrap; white-space: pre; line-height: 0.5em">
procedure ExecuteForm(FormClass: TFormClass): Boolean;
begin
  with FormClass.Create(Appllication) do
  try
    Result := ShowModal = mrOk;
  finally
    Free;
  end;
end;
</div>

To me, property promotion is also a big deal. I wrote a winform control in C# recently and was quite disappointed to learn of all the derived properties which were exposed as public which I would preferred to have hidden.

The windows control section of is also much more powerful. The base control, graphic control, custom control classes have so many more methods.

Event naming in C# irks me to no end. I really want to know if something is an event by looking a it. OnClick to me automatically tells me, "Hey, I'm a click event", whereas Click seems to me like an action (method) "Click the button".  Then c# messes up events further with their virtual names using On (it's Do in Delphi). 

Oh, and I'm not totally sold on EventArgsTypes. It is so annoying in VS to break open the help, searching for the an event to see the type, clicking the type to get to the about page for the type, clicking the EventArgsTypes, then click members, and finally learning what the parameters actually are. In case that wasn't clear, here it is in diagram form:

In VS highlight MouseDown in the property grid -> F1 help pops up
public event MouseEventHandler MouseDown -> click MouseEventHandler
public delegate void MouseEventHandler(Object sender, MouseEventArgs e) -> click MouseEventArgs
public class MouseEventArgs : EventArgs -> click members
MouseEventArgs Members -> scroll down past the constructor and methods inherited from system.object
Ah what type is "Button"? -> click "Button" to find public MouseButtons Button { get; }

In Delphi (using version 7 here) highlight MouseDown in the object inspector -> F1
<div style="white-space: -moz-pre-wrap; white-space: pre; line-height: 0.5em">
type
  TMouseEvent = procedure (Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer) of object;
</div>

Boom! Now that was a lot easier. The event has 5 parameters, and Button is type TMouseButton.

That's enough for now. You get the idea. Delphi is still better.
0
Anthony
9/16/2009 5:24:52 AM
embarcadero.delphi.non-tech 5933 articles. 1 followers. Follow

63 Replies
1052 Views

Similar Articles

[PageSpeed] 19

Anthony Walter wrote:

> 
> Regarding class types, you can't do this in C#:
> 
> <div style="white-space: -moz-pre-wrap; white-space: pre;
> line-height: 0.5em"> 
> procedure ExecuteForm(FormClass: TFormClass):
> Boolean; begin
>   with FormClass.Create(Appllication) do
>   try
>     Result := ShowModal = mrOk;
>   finally
>     Free;
>   end;
> end;
> </div>
> 

I agree with your post, however, I think the above is possible in C#.
I am no expert by far, but I think you can create instances of types
using the Activator class.

something like (forgive my syntax)

void foo(Type aType)
{
  object result = Activator.CreateInstance(aType);
}


foo(typeof(Admission));
0
Bob
9/16/2009 4:03:02 AM
> {quote:title=Bob Fisher wrote:}{quote}
> Anthony Walter wrote:
> 
> > 
> > Regarding class types, you can't do this in C#:
> > 
> > <div style="white-space: -moz-pre-wrap; white-space: pre;
> > line-height: 0.5em"> 
> > procedure ExecuteForm(FormClass: TFormClass):
> > Boolean; begin
> >   with FormClass.Create(Appllication) do
> >   try
> >     Result := ShowModal = mrOk;
> >   finally
> >     Free;
> >   end;
> > end;
> > </div>
> > 
> 
> I agree with your post, however, I think the above is possible in C#.
> I am no expert by far, but I think you can create instances of types
> using the Activator class.
> 
> something like (forgive my syntax)
> 
> void foo(Type aType)
> {
>   object result = Activator.CreateInstance(aType);
> }
> 
> 
> foo(typeof(Admission));

Sure you can, but I think you know what the problem is there. Since C# cannot inherit constructors, you'll never know if the code is valid when you allow an arbitrary Type to be passed. In other words, it might or might not work, which is kind of a crappy way to write code.
0
Anthony
9/16/2009 5:14:07 AM
> {quote:title=Anthony Walter wrote:}{quote}
> I've been using C# and Visual Studio at work, but I still keep coming back to Delphi. Here what I think Delphi has over C# and VS.
> 
> Some features I prefer/need:
> 

It has all become far more complicated than it really needs to be. I've been productively using Delphi for 14 years (virtually daily for the first 10 of those years) and all but half-a-dozen of the items in your list were either gobbledygook or of no use to me. What hope is there for the poor newbies :-(

--
Chris Burrows
CFB Software
http://www.cfbsoftware.com
0
Chris
9/16/2009 7:07:45 AM
Anthony Walter a écrit :

> Sure you can, but I think you know what the problem is there. Since
> C# cannot inherit constructors, you'll never know if the code is
> valid when you allow an arbitrary Type to be passed. In other words,
> it might or might not work, which is kind of a crappy way to write
> code.

There is nothing to stop you from writing your own metaclass which has 
virtual methods that will act as constructors or static methods.

Joanna

-- 
Joanna Carter [TeamB|http://www.teamb.com]
Consultant Software Engineer
0
Joanna
9/16/2009 7:23:09 AM
"Chris Burrows" wrote in message news:162747@forums.codegear.com...

>>
It has all become far more complicated than it really needs to be. I've been 
productively using Delphi for 14 years (virtually daily for the first 10 of 
those years) and all but half-a-dozen of the items in your list were either 
gobbledygook or of no use to me. What hope is there for the poor newbies :-(
<<

You took the words right out of my mouth!  I've been a Delphi newbie since 
Version 4, and didn't understand most of that list, either.

SteveT
0
Steve
9/16/2009 9:54:07 AM
Anthony,

> I love the above. Delphi forces you to place fields before methods or properties. Delphi does not put the implemenation and declaration together, C# is nowhere near this organized. C# is a bunch of implemenation code rolled into declaration code, usually appearing in no organized pattern (ie.e things come in any order).

Using StyleCop to ensure a strict order and Ctrl+M+O shows clearly what the
code file contains -- also there is only exactly one order while your
Pascal implementation-order can be totally different than the
interface-order.

BTW: Delphi enforces nothing, you can mix things the same way as using C#.

-- 
/\/\arkus.
0
Markus
9/16/2009 10:20:38 AM
Steve Thackery wrote:

> "Chris Burrows" wrote in message news:162747@forums.codegear.com...
> 
> > > 
> It has all become far more complicated than it really needs to be.
> I've been productively using Delphi for 14 years (virtually daily for
> the first 10 of those years) and all but half-a-dozen of the items in
> your list were either gobbledygook or of no use to me. What hope is
> there for the poor newbies :-( <<
> 
> You took the words right out of my mouth!  I've been a Delphi newbie
> since Version 4, and didn't understand most of that list, either.

OMG! I think that reading the Delphi Language Guide should be a
mandatory exercise for every Delphi programmer, at least once per year.
People not doing that should have their license revoked. <g>

-- 
Rudy Velthuis (TeamB)        http://www.teamb.com

"I admire the Pope. I have a lot of respect for anyone who can 
 tour without an album." -- Rita Rudner.
0
Rudy
9/16/2009 10:42:58 AM
Markus Springweiler wrote:

> Anthony,
> 
> > I love the above. Delphi forces you to place fields before methods
> > or properties. Delphi does not put the implemenation and
> > declaration together, C# is nowhere near this organized. C# is a
> > bunch of implemenation code rolled into declaration code, usually
> > appearing in no organized pattern (ie.e things come in any order).
> 
> Using StyleCop to ensure a strict order and Ctrl+M+O shows clearly
> what the code file contains -- also there is only exactly one order
> while your Pascal implementation-order can be totally different than
> the interface-order.

Still, there is a nice separation of declaration and implementation. C#
is declaration interspersed with implementation (just like Java), which
makes the sources a pretty mess already, even if you'd use StyleCop
(which not so many seem to do). Delphi does not need an extern program
for this either.

And I'm sure that, if there were demand, one could write a
DdelphiStyleCop tool that also ensured a strict order in the
implementation section. But fortunately, Delphists hardly need
something like it. And, considering the C# sources I have seen, ISTM
that hardly anyone uses StyleCop either. <g>

-- 
Rudy Velthuis (TeamB)        http://www.teamb.com

"If you give a man a fish, he will eat for today. If you teach 
 him to fish, he'll understand why some people think golf is 
 exciting." -- P.G. Wodehouse
0
Rudy
9/16/2009 10:49:07 AM
Rudy,

> considering the C# sources I have seen, ISTM
> that hardly anyone uses StyleCop either. <g>

Yeah, everyone uses its own style of grouping using regions -- I for myself
forbid regions via StyleCop.

-- 
/\/\arkus.
0
Markus
9/16/2009 11:01:12 AM
> {quote:title=Chris Burrows wrote:}{quote}
> > {quote:title=Anthony Walter wrote:}{quote}
> > I've been using C# and Visual Studio at work, but I still keep coming back to Delphi. Here what I think Delphi has over C# and VS.
> > 
> > Some features I prefer/need:
> > 
> 
> It has all become far more complicated than it really needs to be. I've been productively using Delphi for 14 years (virtually daily for the first 10 of those years) and all but half-a-dozen of the items in your list were either gobbledygook or of no use to me. What hope is there for the poor newbies :-(
> 
> --
> Chris Burrows
> CFB Software
> http://www.cfbsoftware.com

gobbledygook? Please explain, and be specific. I thought I was thorough enough. If there was something you didn't understand, and I will attempt to explain, but maybe that is your problem. You never bother to dig deeper.
0
Anthony
9/16/2009 11:39:49 AM
Hello,

Joanna Carter wrote:

> There is nothing to stop you from writing your own metaclass which
> has virtual methods that will act as constructors or static methods.

there's nothing to stop C++ programmers from generating all the RTTI
C++ doesn't provide by themselves.

-- 
Moritz

"Hey, it compiles! Ship it!"
0
Moritz
9/16/2009 11:53:05 AM
> Still, there is a nice separation of declaration and implementation.

Yeah, lots of Pascal programmers say that.

Personally, I see the same information in two different places and that 
looks very inelegant to me, for all the usual well-known engineering 
reasons.

And it was originally done to make the compiler's life easier, wasn't it? 
Nothing to do with being a good programming principle.

SteveT
0
Steve
9/16/2009 12:23:33 PM
> {quote:title=Steve Thackery wrote:}{quote}
> > Still, there is a nice separation of declaration and implementation.
> 
> Yeah, lots of Pascal programmers say that.
> 
> Personally, I see the same information in two different places and that 
> looks very inelegant to me, for all the usual well-known engineering 
> reasons.
> 
> And it was originally done to make the compiler's life easier, wasn't it? 
> Nothing to do with being a good programming principle.
> 
> SteveT

I prefer to see the outline which designates the intent, which helps me digest or organize in my head the purpose and relationship between the type and its members. And no I don't want to switch between folding and unfolding code, it's too cumbersome.

Additionally, I like seeing the member name, followed by the return type, because the name is what is significant to me. IRL when I describe the properties of an object, I want to know what they are first. Example:

A child's toy has:

Color
Weight
Material
AgeGroup

I don't want to see:

ColorType
Integer
string
NumberRange

It make a big difference when you have to stare at stuff such as this all day:

<div style="white-space: -moz-pre-wrap; white-space: pre; line-height: 0.5em">
Toy = class
public 
  Color: ColorType;
  Weight: Integer;
  Material: string;
  AgeGroup: NumberRange;
end;

versus

class Toy {
  public ColorType Color;
  public int Weight;
  public string Material;
  public NumberRange AgeGroup;
}
</div>

Notice how you want to read the names (identifiers) first, Material and AgeGroup for example , but they appear ragged left after the type. I am interested in the intent foremost (aka the identifier) and the type a distant second. Also notice how putting type first makes the identifiers ragged left and thus harder to read in a list, which is what a class outline is, a list. Reading C# becomes tiresome faster than reading Delphi.
0
Anthony
9/16/2009 12:46:06 PM
> There is nothing to stop you from writing your own metaclass which has 
> virtual methods that will act as constructors or static methods.
> 
> Joanna

Joanna, could you please copy me on an example of a C# factory pattern which safely allows arbitrary derived types to be newed up? Thank you.

Anthony
0
Anthony
9/16/2009 12:50:17 PM
Moritz Beutel wrote:

> Hello,
> 
> Joanna Carter wrote:
> 
> > There is nothing to stop you from writing your own metaclass which
> > has virtual methods that will act as constructors or static methods.
> 
> there's nothing to stop C++ programmers from generating all the RTTI
> C++ doesn't provide by themselves.

Indeed. In code. <g>

-- 
Rudy Velthuis (TeamB)        http://www.teamb.com

"The only thing necessary for the triumph of evil is for good 
 men to do nothing."
 -- Edmund Burke (1729-1797)
0
Rudy
9/16/2009 1:04:17 PM
Anthony Walter wrote:
> Notice how you want to read the names (identifiers) first, Material
> and AgeGroup for example , but they appear ragged left after the
> type. I am interested in the intent foremost (aka the identifier) and
> the type a distant second. Also notice how putting type first makes
> the identifiers ragged left and thus harder to read in a list, which
> is what a class outline is, a list. Reading C# becomes tiresome
> faster than reading Delphi.

In visual studio you always have the option to use the Class View. I find 
that this gives me a similar kind of overview of classes and their members. 
What is even more useful in .net, for me, is that a similar kind of overview 
can be obtained for any assembly, including the entire .net framework, using 
the reflector tool. If only the vcl could be searched and browsed in such a 
user-friendly fashion ...

-- 
Thank you
0
Shunyata
9/16/2009 1:05:07 PM
Steve Thackery wrote:

> > Still, there is a nice separation of declaration and implementation.
> 
> Yeah, lots of Pascal programmers say that.
> 
> Personally, I see the same information in two different places and
> that looks very inelegant to me, for all the usual well-known
> engineering reasons.

I find it very elegant, exactly because of the separation I mentioned.
 
> And it was originally done to make the compiler's life easier

No, it wasn't. Pascal doesn't have it. Only later versions of Pascal
had it, because people wanted it. IIRC, Turbo Pascal 4 was the first
Pascal from Borland to have it.

-- 
Rudy Velthuis (TeamB)        http://www.teamb.com

"We've all heard that a million monkeys banging on a million
 typewriters will eventually reproduce the entire works of 
 Shakespeare. Now, thanks to the Internet, we know this is not 
 true." -- Robert Wilensky
0
Rudy
9/16/2009 1:07:39 PM
> {quote:title=Anthony Walter wrote:}{quote}
> 
> gobbledygook? Please explain, and be specific. I thought I was thorough enough. If there was something you didn't understand, and I will 
> attempt to explain, but maybe that is your problem. You never bother to dig deeper.

You were thorough enough in your description of what you like and why you like it but very little translated into anything that I could see of being any use to me. 

Maybe an analogy I have used before about two computer ads on TV might explain what I am getting at. The greybox computer ad boasts about the 3 GigaHertz quad-core CPU,  1TeraByte hard drive, 100Mbit Ethernet etc. etc. The Apple ad tells you can use the computer to share your photos and videos with friends and relatives around the world. 

Chris.
0
Chris
9/16/2009 1:08:40 PM
Rudy Velthuis (TeamB) wrote:
> Fine, but that is not a language option, it is an option of the
> environment. If I see a bunch of C# sources in front of me, that
> doesn't help me a lot.

Reflection is part of the language and not the environment, but I will agree 
with you that if you look at c# source in notepad, for example, then you're 
not going to be able to take advantage of it. Probably not by far the most 
common scenario, however.

-- 
Thank you
0
Shunyata
9/16/2009 1:16:09 PM
Hi,

In reality you will, in both Java and .Net, often see the same information 
declared twice...
An interface file which only declares an interface, and the implementation 
file where you have the code in.

If you dont use interfaces in .Net/Java, then ofcourse you will only have 
the implementation part, but its quite common to use interfaces.


-- 
best regards

Kim Madsen
TeamC4D
www.components4developers.com

The best components for the best developers
High availability, high performance loosely coupled n-tier products

"Steve Thackery" <nobody@nowhere.com> skrev i meddelelsen 
news:162853@forums.codegear.com...
>> Still, there is a nice separation of declaration and implementation.
>
> Yeah, lots of Pascal programmers say that.
>
> Personally, I see the same information in two different places and that
> looks very inelegant to me, for all the usual well-known engineering
> reasons.
>
> And it was originally done to make the compiler's life easier, wasn't it?
> Nothing to do with being a good programming principle.
>
> SteveT
0
Kim
9/16/2009 1:22:22 PM
Shunyata Kharg wrote:

> Rudy Velthuis (TeamB) wrote:
> > Fine, but that is not a language option, it is an option of the
> > environment. If I see a bunch of C# sources in front of me, that
> > doesn't help me a lot.
> 
> Reflection is part of the language and not the environment.

Huh? I am talking about the ugly mix of declaration and implemenation,
IOW about the forced inlining of implementation code. Even C++, one of
the less readable languages around, allows separation of declaration
and implementation. Forced inlining of declaration is something most
Pascals have left behind a long time ago.

In case you are hinting at the class viewer: the class viewer is an
option of the environment, not of the language. Reflection is required
for that, but so is Delphi's RTTI for many parts of the Delphi
environment. Delphi's RTTI doesn't help me read Delphi source in an
editor, just like reflection doesn't help me read C# source in an
editor. But Delphi's separation of declaration and implementation helps
me a lot, in any editor, in any article, in the documentation, etc.

-- 
Rudy Velthuis (TeamB)        http://www.teamb.com

"A doctor can bury his mistakes but an architect can only advise 
 his clients to plant vines."
 -- Frank Lloyd Wright (1868-1959)
0
Rudy
9/16/2009 1:30:10 PM
Shunyata Kharg wrote:

> Rudy Velthuis (TeamB) wrote:
> > Fine, but that is not a language option, it is an option of the
> > environment. If I see a bunch of C# sources in front of me, that
> > doesn't help me a lot.
> 
> Reflection is part of the language and not the environment, but I
> will agree with you that if you look at c# source in notepad, for
> example, then you're not going to be able to take advantage of it.
> Probably not by far the most common scenario, however.

I often read Delphi and C# and C++ sources in an editor of my choice.
Or I read such code in an article or some other kind of documentation.
-- 
Rudy Velthuis (TeamB)        http://www.teamb.com

"Now, now my good man, this is no time for making enemies."
 -- Voltaire (1694-1778) on his deathbed in response to a priest 
    asking that he renounce Satan.
0
Rudy
9/16/2009 1:31:48 PM
Rudy Velthuis (TeamB) wrote:

> Delphi's RTTI doesn't help me read Delphi source in an
> editor, just like reflection doesn't help me read C# source in an
> editor. But Delphi's separation of declaration and implementation
> helps me a lot, in any editor, in any article, in the documentation,
> etc.

Yes, I've already agreed with you that you can't use visual studio's "Class 
View" for viewing c# outside of visual studio. Also, you can only use the 
Reflector tool on assemblies which have been compiled from c# sources 
(compiled with or without visual studio, in that case).

My point is that in my estimation, the majority of programmers read the 
majority of code they read from within an ide. In the case of c#, this means 
they have access to "Class View".

-- 
Thank you
0
Shunyata
9/16/2009 1:38:06 PM
> {quote:title=Rudy Velthuis (TeamB) wrote:}{quote}
> 
> OMG! I think that reading the Delphi Language Guide should be a
> mandatory exercise for every Delphi programmer, at least once per year.
> People not doing that should have their license revoked. <g>
> 

I agree. However, although it might be possible to tell children that they have to spend time learning particular topics whether they like it or not, 'just because', thinking adults have a tendency to question 'why?'. 

To get the most out of reading the Language Guide it is critical that the reader is provided with suffiicent resources to enable him to relate particular sections of the language guide to the various scenarios / types of applications / real world situations that he has an interest in. Otherwise it's about as useful as giving a prospective novelist a dictionary to read. 

For example, when I first ventured into the .NET world a very useful book was 'Programming in the .NET Environment'. Is there something similar for D2010? I do recall that Steve Teixeira and Xavier Pacheco's book was very readable but I don't think that survived beyond D6 / D7 did it? 

--
Chris Burrows
CFB Software
http://www.cfbsoftware.com
0
Chris
9/16/2009 2:08:11 PM
> {quote:title=Chris Burrows wrote:}{quote}
> > {quote:title=Anthony Walter wrote:}{quote}
> > 
> > gobbledygook? Please explain, and be specific. I thought I was thorough enough. If there was something you didn't understand, and I will 
> > attempt to explain, but maybe that is your problem. You never bother to dig deeper.
> 
> You were thorough enough in your description of what you like and why you like it but very little translated into anything that I could see of being any use to me. 
> 
> Maybe an analogy I have used before about two computer ads on TV might explain what I am getting at. The greybox computer ad boasts about the 3 GigaHertz quad-core CPU,  1TeraByte hard drive, 100Mbit Ethernet etc. etc. The Apple ad tells you can use the computer to share your photos and videos with friends and relatives around the world. 
> 
> Chris.

Building a vocabulary helps you be an effective communicator. A vocabulary applies just the same to programming languages. If you don't have the words to attach to concepts, how can think about those concepts? With some thought and consideration you may be able to understand.  If you still don't, try asking asking questions.
0
Anthony
9/16/2009 2:17:12 PM
On 2009-09-16 5:54 AM, Steve Thackery wrote:
> You took the words right out of my mouth!  I've been a Delphi newbie since
> Version 4, and didn't understand most of that list, either.

Delphi has two intersecting user bases:

1. guys like you.
2. guys like him.

Delphi has an orthogonal minimal feature set (easy learning curve) for 
those who wish to use a minimal subset of language features, and know 
only one language.

Delphi is also so darn handy when you need something advanced, or a 
little more mentally involved.  People like the original poster are 
cross-language and cross-toolkit educated, and understand the 
differences in "lingo" between .net and the Delphi world.

You can be a big fish in this little Delphi pond and have no idea what 
Language People are talking about when they talk about closures, 
continuations, delegates,
or all of that. But if you were shown some ObjectPascal that does some 
interesting
pattern, or rather, encapsulates some interesting and re-usable idea 
(that's what Pattern means to language people) you would probably 
understand everything in his list.

You just need a demo.

Warren
0
Warren
9/16/2009 2:28:02 PM
So you wouldn't miss:

1. LINQ
2. The Visual Studio IDE's handling of exceptions?
3. WPF
4. The big fat lovable .net runtime you have to install everywhere, and 
the big fat installer scripts you need to verify all your dependencies 
are installed and the right versions?

:-)

Warren
0
Warren
9/16/2009 2:32:15 PM
Anthony Walter a écrit :

> Joanna, could you please copy me on an example of a C# factory
> pattern which safely allows arbitrary derived types to be newed up?

Not without payment.

Joanna

-- 
Joanna Carter [TeamB|http://www.teamb.com]
Consultant Software Engineer
0
Joanna
9/16/2009 3:27:57 PM
> {quote:title=Joanna Carter wrote:}{quote}
> Anthony Walter a écrit :
> 
> > Joanna, could you please copy me on an example of a C# factory
> > pattern which safely allows arbitrary derived types to be newed up?
> 
> Not without payment.
> 
> Joanna

Translation: It's not possible
0
Anthony
9/16/2009 3:35:56 PM
> {quote:title=Guest wrote:}{quote}
> Using StyleCop to ensure a strict order and Ctrl+M+O shows clearly what the
> code file contains -- also there is only exactly one order while your
> Pascal implementation-order can be totally different than the
> interface-order.
> 
> BTW: Delphi enforces nothing, you can mix things the same way as using C#.
> 
> -- 
> /\/\arkus.

BTW: You are wrong. Delphi forces you to do a lot of things. Go ahead and try to put a method before a field in the same block. Try and declare a property before the field or read/write accessors. Try and use a type or method before it is declared. Go ahead. Try.
0
Anthony
9/16/2009 3:43:27 PM
Hello,

Joanna Carter wrote:

> Not without payment.

see, in Delphi you get it for free :)

-- 
Moritz

"Hey, it compiles! Ship it!"
0
Moritz
9/16/2009 3:45:49 PM
> {quote:title=Warren Postma wrote:}{quote}
> So you wouldn't miss:
> 
> 1. LINQ
> 2. The Visual Studio IDE's handling of exceptions?
> 3. WPF
> 4. The big fat lovable .net runtime you have to install everywhere, and 
> the big fat installer scripts you need to verify all your dependencies 
> are installed and the right versions?
> 
> :-)
> 
> Warren

Sure, C# has some totally awesome features, and .net is completely cool in many areas especially the single rooted object, reflection, implicit/explicit conversions, and such.

I don't mean to say Delphi is the greatest thing ever. It has a lot of problems as well, but they've been working on those just like Microsoft continues to improve C#.

I'm not totally against C#, I'd just like to see it improved. I use the best tool for the job and show no brand ;oyalty, instead I judge something on its merits. For web apps, rich animated content, games (XNA), command line (powershell aka monda), and many other situations, C# wind hands down. My passion though is Windows GUI desktop application development, and I feel Delphi is still ahead in that area for some of the reasons I outline at the front of this thread. I wasn't trying to build an exhaustive 
list.
0
Anthony
9/16/2009 3:48:32 PM
> No, it wasn't. Pascal doesn't have it. Only later versions of Pascal
> had it, because people wanted it. IIRC, Turbo Pascal 4 was the first
> Pascal from Borland to have it.

Ah, thank you.  I'm glad to stand corrected.

SteveT
0
Steve
9/16/2009 4:18:16 PM
Anthony Walter a écrit :

> Translation: It's not possible

Incorrect. I've already done it; it wasn't easy and I'm just not 
prepared to give away the fruits of my labour.

Joanna

-- 
Joanna Carter [TeamB|http://www.teamb.com]
Consultant Software Engineer
0
Joanna
9/16/2009 6:27:17 PM
Chris Burrows wrote:

> > {quote:title=Rudy Velthuis (TeamB) wrote:}{quote}
> > 
> > OMG! I think that reading the Delphi Language Guide should be a
> > mandatory exercise for every Delphi programmer, at least once per
> > year.  People not doing that should have their license revoked. <g>
> > 
> 
> I agree. However, although it might be possible to tell children that
> they have to spend time learning particular topics whether they like
> it or not, 'just because', thinking adults have a tendency to
> question 'why?'.

What would you think about a repair mechanic who has never read the
manual? What would you think of a judge who has never read the law?

-- 
Rudy Velthuis (TeamB)        http://www.teamb.com

"Momma always said life was like a box of chocolates. You never
 know what you're gonna get." -- Forest Gump
0
Rudy
9/16/2009 6:38:28 PM
Moritz Beutel wrote:

> Hello,
> 
> Joanna Carter wrote:
> 
> > Not without payment.
> 
> see, in Delphi you get it for free :)

LOL!

-- 
Rudy Velthuis (TeamB)        http://www.teamb.com

"It’s so easy to become mesmerized by the immediacy of a result
 that you don’t question its validity." -- Naomi Karten
0
Rudy
9/16/2009 6:39:50 PM
Shunyata Kharg wrote:

> My point is that in my estimation, the majority of programmers read
> the majority of code they read from within an ide.

They read the majority of code they WRITE from within an IDE. I'm not
so sure this is true for the rest of the code they read. I guess much
of it is in articles, documentation, etc.
-- 
Rudy Velthuis (TeamB)        http://www.teamb.com

"The pen is mightier than the sword, and considerably easier to
 write with." -- Marty Feldman.
0
Rudy
9/16/2009 6:40:19 PM
Steve Thackery wrote:

> > No, it wasn't. Pascal doesn't have it. Only later versions of Pascal
> > had it, because people wanted it. IIRC, Turbo Pascal 4 was the first
> > Pascal from Borland to have it.
> 
> Ah, thank you.  I'm glad to stand corrected.

You can sit down now, if you like. <g>

-- 
Rudy Velthuis (TeamB)        http://www.teamb.com

"Statistics is like a bikini. What they reveal is suggestive.
 What they conceal is vital."
 -- Arthur Koestler
0
Rudy
9/16/2009 6:41:18 PM
Kim Madsen wrote:

> Hi,
> 
> In reality you will, in both Java and .Net, often see the same
> information declared twice...
> An interface file which only declares an interface, and the
> implementation file where you have the code in.
> 
> If you dont use interfaces in .Net/Java, then ofcourse you will only
> have the implementation part, but its quite common to use interfaces.

This may be true for Java, which seems to be pretty interface-obsessed,
but far less so in .NET, IME. Note that most of the .NET classes are
not just implementations of interfaces. Oh, they often implement simple
interfaces like IComparable or IEnumerable or some such, but unlike in
Java, not their entire public interface is declared as an interface
type.

-- 
Rudy Velthuis (TeamB)        http://www.teamb.com

"I was raised in the West. The west of Texas. It's pretty close 
 to California. In more ways than Washington, D.C., is close to
 California." -- George W. Bush
0
Rudy
9/16/2009 6:44:47 PM
Hi,

If you are doing n-tier, or plugin based development in .Net you are usually 
using interfaces in a grand scale.
In fact quite alot of people chose to follow interface based design patterns 
in .Net, regardless if its really needed, but simply because its the new 
trend.


-- 
best regards

Kim Madsen
TeamC4D
www.components4developers.com

The best components for the best developers
High availability, high performance loosely coupled n-tier products

"Rudy Velthuis (TeamB)" <newsgroups@rvelthuis.de> skrev i meddelelsen 
news:163032@forums.codegear.com...
> This may be true for Java, which seems to be pretty interface-obsessed,
> but far less so in .NET, IME. Note that most of the .NET classes are
> not just implementations of interfaces. Oh, they often implement simple
> interfaces like IComparable or IEnumerable or some such, but unlike in
> Java, not their entire public interface is declared as an interface
> type.
>
> --
0
Kim
9/16/2009 7:31:50 PM
Kim Madsen wrote:

> Hi,
> 
> If you are doing n-tier, or plugin based development in .Net you are
> usually using interfaces in a grand scale.

Interfaces, yes. But in .NET, I have hardly seen interfaces describing
the entire public interface of a class.

> In fact quite alot of people chose to follow interface based design
> patterns in .Net, regardless if its really needed, but simply because
> its the new trend.

Interface based design patterns do not necessarily require that the
entire public interface of a class is exposed as an interface, as one
often sees in Java.

-- 
Rudy Velthuis (TeamB)        http://www.teamb.com

"...well over half of the time you spend working on a project 
 (on the order of 70 percent) is spent thinking, and no tool,
 no matter how advanced, can think for you. Consequently, even 
 if a tool did everything except the thinking for you -- if it
 wrote 100 percent of the code, wrote 100 percent of the 
 documentation, did 100 percent of the testing, burned the CD-ROMs, 
 put them in boxes, and mailed them to your customers -- the best
 you could hope for would be a 30 percent improvement in 
 productivity. In order to do better than that, you have to change
 the way you think." 
 -- Fred Brooks [paraphrased] as quoted from Allen Holub's 
    http://www.javaworld.com/javaworld/jw-07-1999/jw-07-toolbox.html
0
Rudy
9/16/2009 8:10:22 PM
> What would you think about a repair mechanic who has never read the 
> manual? What would you think of a judge who has never read the law?
I think his point was valid. You first need to experiment and get a feel
for the tool before you can develop analytical skills for it. When you
have those skills you should of course depen your understanding and 
enhance it with formal knowledge.
0
Utf
9/16/2009 10:10:07 PM
Maël Hörz wrote:

> > What would you think about a repair mechanic who has never read the 
> > manual? What would you think of a judge who has never read the law?

> I think his point was valid. You first need to experiment and get a
> feel for the tool before you can develop analytical skills for it.
> When you have those skills you should of course depen your
> understanding and enhance it with formal knowledge.

Yes, fine, but I still think that the Delphi Language Guide
should be required reading, at least once a year.

-- 
Rudy Velthuis (TeamB)        http://www.teamb.com

Customer: "I'm running Windows '95."
Tech:     "Yes."
Customer: "My computer isn't working now."
Tech:     "Yes, you said that."
0
Rudy
9/16/2009 10:22:00 PM
Chris Burrows used his keyboard to write :
> You were thorough enough in your description of what you like and why you 
> like it but very little translated into anything that I could see of being 
> any use to me. 

Chris, your analogy rang crystal clear with me. Critical thinking 
should be taught and practiced above anything else.  We as creators of 
products should see the entire picture at all times.  The majority of 
people need to be able to connect the dots from cryptic features to a 
compelling story with an exciting result.  It does bing-bang-boom?...  
What can I do with that?... oh cool!

People designing products should always be asking those types of 
questions of themself.  What's the value proposition and is this having 
the net effect of doing more good than harm?  Are you sure you really 
understand the side-effects and collateral damage of your decisions?  
Watch out, don't get bogged down with analysis paralysis.  This topic 
fills volumes of books and usually takes an entire lifetime to learn 
and is never mastered.
--
Lee
0
Lee
9/16/2009 11:15:03 PM
> {quote:title=Lee Grissom wrote:}{quote}
> 
> Chris, your analogy rang crystal clear with me. Critical thinking 
> should be taught and practiced above anything else.  We as creators of 
> products should see the entire picture at all times.  The majority of 
> people need to be able to connect the dots from cryptic features to a 
> compelling story with an exciting result.  It does bing-bang-boom?...  
> What can I do with that?... oh cool!
> 

Yes indeed. Malcolm Groves illustrated that point excellently at a D2010 presentation here in Adelaide last night when he gave a very good explanation of the new Attributes feature. By way of introduction he said something like: First of all I'm going to show 'How you can do it'. Then I'll show you 'Why you might want to do it'. It all made perfect sense.

Chris
0
Chris
9/16/2009 11:45:37 PM
Chris Burrows wrote:

> It has all become far more complicated than it really needs to be.
> I've been productively using Delphi for 14 years (virtually daily for
> the first 10 of those years) and all but half-a-dozen of the items in
> your list were either gobbledygook or of no use to me. What hope is
> there for the poor newbies :-(

My guess is that the features *are* of use to you. The difference
between knowing what they actually mean (and more importantly whether
you *need* to know) and whether they're of use to you, can be vast. Of
course some of the items may only be of use to you only because they're
implemented in the VCL and/or third party code.

Your understanding of them (or lack thereof) doesn't change the
validity of the list one iota.

-- 
Dave Nottage [TeamB]
0
Dave
9/17/2009 12:26:45 AM
Chris Burrows wrote:

> > {quote:title=Anthony Walter wrote:}{quote}
> > I've been using C# and Visual Studio at work, but I still keep
> > coming back to Delphi. Here what I think Delphi has over C# and VS.
> > 
> > Some features I prefer/need:
> > 
> 
> It has all become far more complicated than it really needs to be.
> I've been productively using Delphi for 14 years (virtually daily for
> the first 10 of those years) and all but half-a-dozen of the items in
> your list were either gobbledygook or of no use to me.

If some are gobbledygook to you, how can you possibly know they are of
no use to you?
-- 
Rudy Velthuis (TeamB)        http://www.teamb.com

"Most software today is very much like an Egyptian pyramid with
 millions of bricks piled on top of each other, with no 
 structural integrity, but just done by brute force and thousands
 of slaves." -- Alan Kay
0
Rudy
9/17/2009 12:48:54 AM
Rudy Velthuis (TeamB) wrote:

> They read the majority of code they WRITE from within an IDE. I'm not
> so sure this is true for the rest of the code they read. I guess much
> of it is in articles, documentation, etc.

I could do a Rudy on you here and point out the impossibility of writing 
something without reading it ;-)

Certainly code in documentation isn't complex enough to require the 
separation of declaration and implementation to be able to understand it 
quickly, IMO. Code in articles can get complex, that is why a lot of them 
have projects you can download and run in an ide to get a clearer idea of 
what's going on!

-- 
Thank you
0
Shunyata
9/17/2009 6:12:11 AM
Anthony Walter wrote:
> I've been using C# and Visual Studio at work, but I still keep coming back to Delphi. Here what I think Delphi has over C# and VS.
> 
> Some features I prefer/need:

Great list!  I have been writing more .NET and Java for the last year 
than Delphi. At first it takes you some while to learn the "new 
thinking" that each language has as the basis. If you try to strictly 
use the style that you have learned with another language, you go astray 
quite soon. But still every language has good and bad features - and you 
miss the good ones of the other one.

..NET has some great features that make life easier, but I also miss many 
of those you listed - and hate, for example partial classes and regions 
quite much. In general, there is something hazy in coding with .NET, 
which makes you uncertain even though you cannot explain what.

..NET introduces some new things, such as LINQ which help quite much in 
certain operations that are very complicated otherwise (for example 
parsing XML). Nevertheless, you have an unsure feeling that this 
technique is still not proven and probably may change in future quite much.

In contrast Java seems very strict and forces you to write things in a 
certain manner, but somehow you believe the things you cannot do are 
good for you, although they do not always feel so. Also Eclipse, for 
example, helps me to write very clear and well organized code - without 
any (#&/%#) regions.

And for example interfaces in Java are used in a much more concise 
manner, which enables you to change the implementation class quite 
freely (i.e. Map can be implemented with HashMap or ConcurrentHashMap) 
without affecting the external interface of a class, whereas in .NET I 
have found that changing the implementation (i.e. List to BindingList) 
enforces me to also change the class interface (i.e. property type) 
respectively. Well these things do not compare directly, but anyway, 
that's my experience.

Anyway, I think I have learned a lot of useful things while playing with 
other languages. Especially reading "Effective Java" has taught me new 
principles that are good for all languages.

And still I feel most home with Delphi. The issues you mentioned are 
also things that I like in Delphi. Especially sets and arrays of enum 
types are still very cool and simple to use.

But Delphi does leave some things more in the air and you need to be 
more careful with memory and pointer usage, for example.

Unfortunately, I cannot take full use of the latest Delphi features, 
yet, as most of the Delphi development is still tied to older Delphi 
versions (which still compare extraordinarily well to the other tools, 
especially in GUI development).

I always strive to find the simplest possible way to design the code 
with the language in use - and to be able to do that you try to take the 
language to it's limits. Often it rewards you with much more reliable 
applications, which is the ultimate target, of course.

Jouni Aro
Prosys
0
Jouni
9/17/2009 7:34:41 AM
Shunyata Kharg wrote:

> Rudy Velthuis (TeamB) wrote:
> 
> > They read the majority of code they WRITE from within an IDE. I'm
> > not so sure this is true for the rest of the code they read. I
> > guess much of it is in articles, documentation, etc.
> 
> I could do a Rudy on you here and point out the impossibility of
> writing something without reading it ;-)

What is "doing a Rudy" precisely?
> 
> Certainly code in documentation isn't complex enough to require the
> separation of declaration and implementation to be able to understand
> it quickly, IMO.

Dunno. I find some more complex examples hard to read, especially in C#
and Java.

> Code in articles can get complex, that is why a lot
> of them have projects you can download and run in an ide to get a
> clearer idea of what's going on!

That is not really a big help when I'm reading the article.

-- 
Rudy Velthuis (TeamB)        http://www.teamb.com

"The unavoidable price of reliability is simplicity." 
 -- C.A.R. Hoare
0
Rudy
9/17/2009 4:54:26 PM
Hi,

There is not much difference between Java and C# regarding interface 
requirements.
Developers may choose to provide a larger or smaller part in them, but thats 
local implementation details.


-- 
best regards

Kim Madsen
TeamC4D
www.components4developers.com

The best components for the best developers
High availability, high performance loosely coupled n-tier products

"Rudy Velthuis (TeamB)" <newsgroups@rvelthuis.de> skrev i meddelelsen 
news:163074@forums.codegear.com...
> Kim Madsen wrote:
>
>> Hi,
>>
>> If you are doing n-tier, or plugin based development in .Net you are
>> usually using interfaces in a grand scale.
>
> Interfaces, yes. But in .NET, I have hardly seen interfaces describing
> the entire public interface of a class.
>
>> In fact quite alot of people chose to follow interface based design
>> patterns in .Net, regardless if its really needed, but simply because
>> its the new trend.
>
> Interface based design patterns do not necessarily require that the
> entire public interface of a class is exposed as an interface, as one
> often sees in Java.
>
> -- 
> Rudy Velthuis (TeamB)        http://www.teamb.com
>
> "...well over half of the time you spend working on a project
> (on the order of 70 percent) is spent thinking, and no tool,
> no matter how advanced, can think for you. Consequently, even
> if a tool did everything except the thinking for you -- if it
> wrote 100 percent of the code, wrote 100 percent of the
> documentation, did 100 percent of the testing, burned the CD-ROMs,
> put them in boxes, and mailed them to your customers -- the best
> you could hope for would be a 30 percent improvement in
> productivity. In order to do better than that, you have to change
> the way you think."
> -- Fred Brooks [paraphrased] as quoted from Allen Holub's
>    http://www.javaworld.com/javaworld/jw-07-1999/jw-07-toolbox.html
0
Kim
9/17/2009 8:27:19 PM
Kim Madsen wrote:

> Hi,
> 
> There is not much difference between Java and C# regarding interface 
> requirements.

That is nor what I am saying. I said that unlike in Java, in .NET you
don't see a lot of interfaces fully describing an entire class or type
of class. In .NET, interfaces tend to be much smaller and only
describing one aspect of a class. Classes often implement several of
them.

> Developers may choose to provide a larger or smaller part in them,
> but thats local implementation details.

Yes, of course. It is just that in .NET, you hardly ever see those
large interfaces.

-- 
Rudy Velthuis (TeamB)        http://www.teamb.com

"Not everything that can be counted counts, and not everything 
 that counts can be counted." -- Albert Einstein
0
Rudy
9/17/2009 8:43:16 PM
Anthony Walter wrote:

> 
> Oh, and I'm not totally sold on EventArgsTypes. It is so annoying in
> VS to break open the help, searching for the an event to see the
> type, clicking the type to get to the about page for the type,
> clicking the EventArgsTypes, then click members, and finally learning
> what the parameters actually are. In case that wasn't clear, here it
> is in diagram form:

  I've seen 2 justifications for this.
1) There's less stuff passed on the stack.
2) You can change what's in EventArgTypes without changing the function
signature. I believe that this was more important, and allowed the .net
framework to be developed faster. I've used this approach a couple of
times myself where I'm not sure what I might end up needing.

Mike S.
0
Mike
9/17/2009 8:55:38 PM
Mike Swaim wrote:

> Anthony Walter wrote:
> 
> > 
> > Oh, and I'm not totally sold on EventArgsTypes. It is so annoying in
> > VS to break open the help, searching for the an event to see the
> > type, clicking the type to get to the about page for the type,
> > clicking the EventArgsTypes, then click members, and finally
> > learning what the parameters actually are. In case that wasn't
> > clear, here it is in diagram form:
> 
>   I've seen 2 justifications for this.
> 1) There's less stuff passed on the stack.
> 2) You can change what's in EventArgTypes without changing the
> function signature. I believe that this was more important, and
> allowed the .net framework to be developed faster. I've used this
> approach a couple of times myself where I'm not sure what I might end
> up needing.

That may work out nicely in .NET, where you (must) instantiate so many
classes on the fly, which can then be garbage collected when they are
not used anymore. Most of these classes have quite a few overloaded
constructors or class methods that return an instance with the desired
parameters. I personally don't like to do that for almost every method
call. It is IMO much nicer to be able to pass parameters directly, and
it is probably a little more performant too.

-- 
Rudy Velthuis (TeamB)        http://www.teamb.com

"Tragedy is when I cut my finger. Comedy is when you walk into 
 an open sewer and die." -- Mel Brooks
0
Rudy
9/17/2009 9:02:24 PM
On Tue, 15 Sep 2009 22:24:52 -0700, Anthony Walter <> wrote:

>I've been using C# and Visual Studio at work, but I still keep coming back to Delphi. Here what I think Delphi has over C# and VS.
>
>Some features I prefer/need:
>
>sets and set operations

Yes.  I hate not having them in C#.

A few you missed:

Arrays indexed on anything you want that's fundamentally a numeric
type.  I just found myself wanting array [boolean, 1..4] -- nope, not
in C#.

Scoping rules:

In Delphi I can put things inside where they belong so nothing else
can see them.  I'm from the camp that tries to make code as
self-documenting as possible.  This tends to make for very short
procedures that call nested procedures.  This doesn't work nearly as
well in C#.

I also end up with static arrays declared outside the routine rather
than inside it even though they are going to be used only to lookup a
value inside the routine.
0
Loren
9/17/2009 9:54:02 PM
Rudy Velthuis (TeamB) wrote:

> What is "doing a Rudy" precisely?

Not reading a thread in its entirety before responding in case someone
else has already made the same response before you.  ;-)

-- 
Andy Syms
Technosoft Systems Ltd
0
Andy
9/18/2009 3:29:20 PM
Hello,

> Shunyata Kharg wrote:
>
> > I could do a Rudy on you here and point out the impossibility of
> > writing something without reading it ;-)

ROTFL.


Rudy Velthuis (TeamB) wrote:

> What is "doing a Rudy" precisely?

I think I never saw a more consise depiction of your sophistic style of
discussion :)

-- 
Moritz

"Hey, it compiles! Ship it!"
0
Moritz
9/18/2009 4:37:14 PM
Andy Syms wrote:

> Rudy Velthuis (TeamB) wrote:
> 
> > What is "doing a Rudy" precisely?
> 
> Not reading a thread in its entirety before responding in case someone
> else has already made the same response before you.  ;-)

Look who's talking!

That is "pulling a Rudy", and it is also called "pulling an Andy", for
the same reason, IIRC. <g>

-- 
Rudy Velthuis (TeamB)        http://www.teamb.com

"Do, or do not. There is no 'try'."
 -- Yoda ('The Empire Strikes Back')
0
Rudy
9/18/2009 5:05:45 PM
Moritz Beutel wrote:

> Rudy Velthuis (TeamB) wrote:
> 
> > What is "doing a Rudy" precisely?
> 
> I think I never saw a more consise depiction of your sophistic style
> of discussion :)

Ok, then I'm relieved. There is also "pulling a Rudy", and that is what
Andy describes and what half of the people here seem to do. I was under
the impression someone had leaked private information. <g>

-- 
Rudy Velthuis (TeamB)        http://www.teamb.com

"It is better to have a permanent income than to be fascinating."
 -- Oscar Wilde (1854-1900)
0
Rudy
9/18/2009 5:07:33 PM
Moritz Beutel wrote:

> > What is "doing a Rudy" precisely?
> 
> I think I never saw a more consise depiction of your sophistic style
> of discussion :)

FWIW, I don't think it is sophistic, even if it may sometimes look like
it.

-- 
Rudy Velthuis (TeamB)        http://www.teamb.com

"No mention of God. They keep Him up their sleeves for as long as
 they can, vicars do. They know it puts people off." 
 -- Alan Bennett.
0
Rudy
9/18/2009 5:09:51 PM
Kim Madsen wrote:
> Hi,
> 
> If you are doing n-tier, or plugin based development in .Net you are usually 
> using interfaces in a grand scale.
> In fact quite alot of people chose to follow interface based design patterns 
> in .Net, regardless if its really needed, but simply because its the new 
> trend.
> 
> 

Perhaps this is better?

http://wings-of-wind.com/2009/09/22/what-about-class-types/


-- 

m. Th.

On the Wings of the Wind...
http://wings-of-wind.com/
0
m
9/22/2009 8:43:38 AM
Rudy Velthuis (TeamB) wrote:

> 
> This may be true for Java, which seems to be pretty
> interface-obsessed, but far less so in .NET, IME. Note that most of
> the .NET classes are not just implementations of interfaces. Oh, they
> often implement simple interfaces like IComparable or IEnumerable or
> some such, but unlike in Java, not their entire public interface is
> declared as an interface type.

Well, there is the whole IData set of interfaces. But, in general, .net
interfaces tend to be small. The down side is that most interesting
classes implement 4+ interfaces.

Mike S.
0
Mike
9/23/2009 11:53:10 PM
Shunyata Kharg wrote:

> Anthony Walter wrote:
> > Notice how you want to read the names (identifiers) first, Material
> > and AgeGroup for example , but they appear ragged left after the
> > type. I am interested in the intent foremost (aka the identifier)
> > and the type a distant second. Also notice how putting type first
> > makes the identifiers ragged left and thus harder to read in a
> > list, which is what a class outline is, a list. Reading C# becomes
> > tiresome faster than reading Delphi.
> 
> In visual studio you always have the option to use the Class View. 

Fine, but that is not a language option, it is an option of the
environment. If I see a bunch of C# sources in front of me, that
doesn't help me a lot.

-- 
Rudy Velthuis (TeamB)        http://www.teamb.com

"The wit makes fun of other persons; the satirist makes fun of 
 the world; the humorist makes fun of himself." 
 -- James Thurber (1894-1961), 
    in Edward R. Murrow television interview
0
Rudy
10/29/2010 7:59:39 PM
Reply:

Similar Artilces:

Code works in Delphi 7 but not in Delphi 2010 [Edit]
hello, i have a procedure that open's a file by passing the file name as the parameter to the executable. something like this {code} C : \ P r o g r a m F i l e s \ Da c k e r \ D r a c k e r . e x e " G : \ D E l p h i 7 \ D e l p h i 7 A p p _ l o g . t " {code} The source code is {code} procedure OpenFileWithExe var hReg: HKEY; Ret: Longint; RegDataType, RegDataSize: DWORD; CmdLine: array [0..560] of Char; Len: Integer; SInfo: TStartupInfo; PInfo: TProcessInformation; begin Ret := windows.RegOpenKeyEx(HKEY_CURRENT_USER, ...

On Using C++ code from Delphi [Edit]
Hello, one of the most frequently requested - but never realized - features for Delphi is the ability to use C++ code. I'd like to know about your needs regarding C++, and how you think about such a feature. - Is it critical for you to be able to use 3rd-party C++ libraries and C++ classes in Delphi without further changes or additional work? - Or do you want to use VCL components written in C++ in your Delphi projects? - Imagine a solution that makes C++ classes visible to Delphi code, with the following restrictions: o the C++ code needs to be built with C++Builder, o t...

Trying to call a .DLL from Delphi XE (used to work with Delphi 6 :-) )
Hi everyone, I have a problem where perhaps some one could help point me in the right direction. In Delphi 6 I used a stand alone package to train a neural netowrk,. The trained neural network was stored as a .DEF file. The standalone software provided a .DLL and Delphi code to call the network and get the prediced values from your sw. (The .DLL was created in 2002 and apparently is 32 bit.) I have'nt used it for years but am now coming back to it.... I now use Delphi XE on Windows 7 (32 bit) The old .exe's I had compiled from that time work fine. However in Delphi XE ...

Using 7zip delphi wrapper from C++ [Edit]
I'm trying to utilize "7za.dll" together with this Delphi wrapper - http://www.progdigy.com/?page_id=13 Download of the wrapper itself is here - http://code.google.com/p/d7zip/downloads/detail?name=d7zipv1.2.zip&can=2&q= Having difficulties translating this code to C++ and understanding the wrapper itself: {code} procedure TMainForm.ExtractAllClick(Sender: TObject); var Arch: I7zOutArchive; begin Arch := CreateOutArchive(CLSID_CFormat7z); // add a file Arch.AddFile('c:\test.bin', 'folder\test.bin'); // add files using wil...

SEPA components for Delphi with Source Code (Delphi 5
Hi all, in the european union change next year the Bankingformat to the SEPA Format. All peoples and companies must change the bankingssoftware and the costumer data form acountnummers in the new IBAN and BIC numbers. See: http://www.arma-it.de/shop/artikelueber.php?wgruppeid=211&wgruppe_offen=211 Functions: - generate SEPA XML'S - Calc IBAN - BIC Database (DE,AT and CH) Questions: vertrieb@arma-it.de PS: Bankinssoftware for Develpoers (Germany only) http://www.arma-it.de/shop/artikelueber.php?wgruppeid=212&wgruppe_offen=212 El 26/10/13 21:38, A...

Using C++ Code in Delphi XE4 64-bit [Edit]
I am interested in using C++ code in a Delphi XE4 Pro 64-bit app (no iOS, I did not want to pay the "nominal fee", at least not yet). I don't want to use a DLL, I want to link the C++ right into the 64-bit EXE. It is not easy finding info on this online, there's some stuff but not enough to answer all my questions. 1) Do I need to use C++ Builder 64-bit to create object files that can be linked via $LINK in Delphi XE4 64-bit? Or can I create them using Visual Studio? 2) Do I need to "flatten out" C++ classes in order to share them with Delphi or to share them ...

How to create runtime and design time packages using c++ and NOT Delphi [Edit]
Hello, I'm creating an Embarcadero component package, written in c++. Up to now, the runtime and design time parts were grouped together in my package, and I did not really need to have two versions of my package, because the difference in code between runtime and design time was very small. But now, I need to add a property editor in my package, meaning add a form that will be used exclusively on design time. I tried to separate my package in 2 distinct projects, one for runtime and other for design time, and f ollowing some documentation, I built the runtime part, then I added the de...

Import C or C++ DLL in Delphi [Edit]
Hello, usually I can import a dll written in C in Delhi. To do that I write a unit (wrapper.pas) to link the dll with my VCL project. example: {code} function UCC_OpenCamera(CamId: LongWord; SpeedLimit: integer): UNI_RETURN_TYPE; stdcall external 'UniControl.DLL'; {code} This way works fine for me but it requires writing a lot of code to translate all calls and types in delphi. There isn't another way to "convert/import automaticcally" the .dll? 1) Can I create a package inside C++ Builder and use it inside Delphi? 2) The command line tools IMPLIB.EXE (for ...

Delphi XE2 DLL can't be used in C# application [Edit]
For testing I am trying to call a Delphi XE2 DLL (see code) in a C# application (developed in Visual C# 2010 Express). procedure CLP; stdcall; export; begin showmessage('TEST'); end; exports CLP; However when trying to add the DLL as reference to a C# project the following message appears: "A reference to 'D:\temp\test.dll' could not be added. Please make sure that the file is accessible, and that is a valid assembly or COM component." When the same DLL is compiled under Delphi 2010 it works without any problem. Any suggestions how to solve the p...

Using Delphi 7 and Delphi 2010
I had a project in Delphi 7. I worked on it in Delphi 2010. When I try to open the .dpr again in Delphi 7, the IDE toolbar widens across both monitors, and Delphi 7 locks up. It appears that Delphi 2010 modifies the .dpr in a way that makes Delphi 7 unable to open it again. All my forms & units appear to open fine in D7 after D2010, except for the warnings on the ExplicitHeight and ExplicitWidth properties being missing... I can easily recreate the .dpr, but is this expected behavior? Thanks. Tom Field wrote: > I had a project in Delphi 7. > > I worked o...

Re: calling a c++ function from Delphi [Edit] [Edit]
costa basil wrote: > Sorry, I posted it here because different people read different lists > and c++ guys might not read the delphi lists and vice-versa and I > want to pick-up all brains... And yet, it is not allowed. -- Rudy Velthuis (TeamB) http://www.teamb.com "This isn't right, this isn't even wrong." -- Wolfgang Pauli (1900-1958), upon reading a young physicist's paper ok, understood. ...

More C to Delphi [Edit]
Hi, what's the equivalent code in Delphi for: 1) typedef struct _cl_device_id * cl_device_id; 2) #define CL_FLT_MAX 0x1.fffffep127f #define CL_FLT_MIN 0x1.0p-126f #define CL_FLT_EPSILON 0x1.0p-23f they're 1.0 * 2^127, 1.0*2^-126 and 1.0*2^-23, but is there any way to represent them in Delphi with consts, except for approximating? edit: well 0x1.fffffep127f isn't 1.0 * 2^127 actually, mis-read it. Thanks, Dan. Edited by: Daniel Bartlett on Mar 15, 2009 3:03 AM Daniel Bartlett wrote: > Hi, > > what's th...

C# to Delphi, does it work?
The babel code client. http://lingua.embarcadero.com/babelcode/client/BabelClient.aspx It works with some code: using System; public class HelloWorld { public static void Main(string[] args) { Console.Write("Hello World!"); } } Tranlates to: type TArrayOfString = array of string; HelloWorld = class public class procedure Main(args: TArrayOfString);static; end; implementation {$AUTOBOX ON} {$HINTS OFF} {$WARNINGS OFF} class procedure HelloWorld.Main(args: TArrayOfString); begin Console.Write('Hello World!'...

C++ to Delphi [Edit]
Hello! Can someone please convert this DLL source to Delphi {code:c++} // HookDLL.cpp : Defines the entry point for the DLL application. // #include "stdafx.h" #include "HookDLL.h" BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { //Flesh out the entry point pending full implimentation // reserve the DLL handle ghModule = (HINSTANCE)hModule; // register system-wide message SWM_TRAYMSG = RegisterWindowMessage("TRAY_ACTIVATED"); // will be used ...

Web resources about - I Use C# at Work and Still Prefer Delphi [Edit] - embarcadero.delphi.non-tech

File:Userbox prefer.svg - Wikipedia, the free encyclopedia
This file contains additional information, probably added from the digital camera or scanner used to create or digitize it.If the file has been ...

Report: Shoppers Prefer Dealing Directly With Retailers Vs. Purchasing Via Facebook
How effective is Facebook as a marketing tool for retailers ? It depends which study you believe. continued… New Career Opportunities Daily: ...

Report: Teens on Facebook love Eminem, seniors prefer Taylor Swift
... of fodder to establish commonality with their clients. Some of the Facebook-relevant data includes: Those under 18 who liked an artist preferred ...

Convertible Notes : Why would an early-stage investor specifically NOT prefer a convertible note structure ...
Answer (1 of 6): There are very clear reasons and the best early-stage investors do price rounds: * If you're an early stage investor you're ...

Cats prefer cable - Flickr - Photo Sharing!
Explore Johnny Vulkan's photos on Flickr. Johnny Vulkan has uploaded 2743 photos to Flickr.

Obama Prefers Spock - YouTube
Leonard Nimoy recounts an encounter with Barack Obama at a political function in which the Sentator said, "I heard you were here" while giving ...

Santa prefers iPhones: report
Get an iPhone for Christmas? You're definitely not alone.

Do men actually prefer the 'no make-up' look or is it a big lie?
For as long as I can remember, men have declared they prefer ''the natural look'' on women. But that could all be complete hogwash, according ...

Bombers prefer surgical strikes
ESSENDON has ditched the sledgehammer for the scalpel.

Aussies prefer overseas online stores
AUSTRALIAN shoppers prefer to buy from international online retailers rather than local ones.

Resources last updated: 12/10/2015 12:52:18 PM