Board index » delphi » Re: D8: first impression and uneasy feeling... (long)

Re: D8: first impression and uneasy feeling... (long)


2004-02-20 12:40:39 AM
delphi104
"Arthur Hoornweg" <XXXX@XXXXX.COM>writes
Quote
Try this:
What should I be looking for?
 
 

Re: D8: first impression and uneasy feeling... (long)

At 15:07:44, 19.02.2004, Don Strenczewilk writes:
Quote
Speaking of readable, I don't know if this one's been mentioned before,
but one thing that I really dislike about C* is variable naming where
the type comes before the name. I.e. what type is 'amt' below:

var
cost : double;
quant : integer;
amt : double;
percentage : integer;
------
C#:
double cost;
int quant;
double amt;
int percentage;
In that respect, C# is a lot more readable than C or C++. In C# you have:
int[][12] myArray;
in C and C++ this is:
int* myArray[12];
The fact that the type comes before the identifier is not a problem. It
just needs some getting used to, if you are used to Pascal or Delphi. But
the nesting of the identifier in the attributes is a problem in C and C++
(not in C#).
--
Rudy Velthuis (TeamB)
"There are some experiences in life which should not be demanded twice
from any man, and one of them is listening to the Brahms Requiem."
- George Bernard Shaw (1856-1950)
 

Re: D8: first impression and uneasy feeling... (long)

Brion L. Webster writes:
Quote
Arthur Hoornweg writes:

>Yes, but "Begin" and "End" are infinitely easier to pronounce
>than "{" and "}" .....

What - can not you say "open french brace"? <g>

-Brion
Wait a minute - I thought that was an "open freedom brace"!
;^)
--
Jack Johnson
{*word*104}worlds Inc.
www.{*word*104}worlds.com/
www.swidgets.com/
www.passphrasekeeper.com/
608-362-0318
 

Re: D8: first impression and uneasy feeling... (long)

Admiral Jake writes:
Quote
I
actually go back and "correct" improperly cased items as a type.
I do to. But if I make a case error, the compiler doesn't care --
something for which I am grateful.
--
Nick Hodges -- TeamB
Lemanix Corporation
Read my Delphi Blog -- www.lemanix.com/nick/
 

Re: D8: first impression and uneasy feeling... (long)

Jimmy [Used-Disks] writes:
Quote

I bet you would REALLY like If..EndIf, eh? :p
Blech.
--
Nick Hodges -- TeamB
Lemanix Corporation
Read my Delphi Blog -- www.lemanix.com/nick/
 

Re: D8: first impression and uneasy feeling... (long)

Don Strenczewilk writes:
Quote
var
cost : double;
quant : integer;
amt : double;
percentage : integer
I +totally+ agree here. Pascal's is vastly superior. The above is
much easier for me to read: "cost is a double, quant is an integer",
etc.
In C#, you have to move left to right with your eyes, an unatural thing
in much of the world.
--
Nick Hodges -- TeamB
Lemanix Corporation
Read my Delphi Blog -- www.lemanix.com/nick/
 

Re: D8: first impression and uneasy feeling... (long)

Not to mention that it is fun because some individiuals have short fuses and
easy buttons to press :-)
-- Robert Kozak
"Admiral Jake" <johnjac76[nospam]@comcast.net>writes
Quote
"Robert Kozak" <XXXX@XXXXX.COM>writes
news:4034265b$XXXX@XXXXX.COM...
>I just dont see a point to religious language debates.

I tend to agree that religion is far too prevalent in software
development,
but the debates can sometimes be very educational. You can learn a lot
about
a language by watching a zealot defend it vigorously.


 

Re: D8: first impression and uneasy feeling... (long)

Admiral Jake writes:
Quote
But I don't think a namespace that is that large is more manageable, or good
design.
Namespaces are simply logical groupings for classes. If it makes sense
to group classes together so that developers can find the classes more
easily then that is the way they should be grouped. You shouldn't have
to refactor just because of a compiler limitation. For example, if I
have a namespace called BusinessObjects I might then have to create
BusinessObjects1, BusinessObjects2, ... just to keep the compiler
happy. That will make it pretty hard for the development team to find
the right class. I agree that you can work around this and introduce a
whole lot of sub-categories, but this is not always desirable. Still...
it's no train smash and I don't consider this a serious limitation of
Delphi. it is just a minor "feature limitation" that the C# advocates
will probably use against Delphi. ;-) To me C# lacks a few important
constructs that Delphi has: e.g. SETS. that is more important to me than
the namespace issue.
 

Re: D8: first impression and uneasy feeling... (long)

"Nick Hodges (TeamB)" <XXXX@XXXXX.COM>writes
Quote
In C#, you have to move left to right with your eyes, an unatural thing
in much of the world.
True, not here, though <g>
FWIW, I too find C# declarations very hard to read compared to Pascal (even
after having worked almost full time in C# for the last 18 months).
- Per
 

Re: D8: first impression and uneasy feeling... (long)

That what I find too Rudy.
On the other hand it is a lot harder for me to adjust to the tab spacing. I
am used to 2 spaces for indentation. C(++/#) code feels like it is bleeding
all over the page. :-)
-- Robert Kozak
"Rudy Velthuis (TeamB)" <XXXX@XXXXX.COM>writes
Quote
At 06:42:44, 19.02.2004, Nick Hodges (TeamB) writes:

>David Clegg writes:
>
>>Fair enough. I have been doing C# for about a year and, although I don't
>>hate them enough to dislike C# as a whole, I am still yet to
>>appreciate the little squigglies.
>
>I agree with Danny Thorpe:
>
>"I prefer "begin/end" over piles of squigglies. "begin" is easier for
>my
>eyes to distinguish from "end" than "{" is from "}"."

If code is properly indented, and { and } are indented the same, I think
squigglies are just as easy to read, and leave a little more white space.

--
Rudy Velthuis (TeamB)

"I'm not a member of any organized political party, I am a Democrat!"
-- Will Rogers (1879-1935)
 

Re: D8: first impression and uneasy feeling... (long)

At 19:07:23, 19.02.2004, Nick Hodges (TeamB) writes:
Quote
Don Strenczewilk writes:

>var
>cost : double;
>quant : integer;
>amt : double;
>percentage : integer

I +totally+ agree here. Pascal's is vastly superior. The above is
much easier for me to read: "cost is a double, quant is an integer",
etc.
And the C# crowd would read theirs as: I have an int called quant, and a
double called amt. <g>
Quote
In C#, you have to move left to right with your eyes, an unatural thing
in much of the world.
Only if you want to read it the way you do. I am sure that to someone used
to C, C++, Java or C#, Delphi's way look unnatural.
--
Rudy Velthuis (TeamB)
"If you can not get rid of the skeleton in your closet, you'd best teach it
to dance."
- George Bernard Shaw (1856-1950)
 

Re: D8: first impression and uneasy feeling... (long)

At 19:17:51, 19.02.2004, Robert Kozak writes:
Quote
That what I find too Rudy.

On the other hand it is a lot harder for me to adjust to the tab
spacing. I am used to 2 spaces for indentation. C(++/#) code feels like
it is bleeding all over the page. :-)
I've done enough C++ to be used to that. Earlier, I'd use 3 spaces
per tab, but 4 looks neater.
I just hate it when people use hard tabs in C#, and I have to read that
in some normal editor with tabs at 8 each.
--
Rudy Velthuis (TeamB)
"Give me a museum and I will fill it."
-- Pablo Picasso (1881-1973)
 

Re: D8: first impression and uneasy feeling... (long)

I see you're point. Fortunately, I don't need to write any C or C++ and I'm
pretty much used to writing them with C# now. The point I am trying to make
is, when reading code, and I run across a variable and want to know its
type, it is hard to find it in the source code because I can not simply eyeball
up the left column as I can with Delphi as the list below demonstates.
BTW, I really enjoy the quotes tagged onto the end of your msgs.
Quote
>var
>cost : double;
>quant : integer;
>amt : double;
>percentage : integer;
>------
>C#:
>double cost;
>int quant;
>double amt;
>int percentage;
 

Re: D8: first impression and uneasy feeling... (long)

At 00:42:01, 19.02.2004, Dave Jewell writes:
Quote
using (StreamWriter f = new StreamWriter (@"c:\wombat.txt"))
{
for (int idx = 0; idx < listBox1.Items.Count; idx++)
f.WriteLine (listBox1.Items [idx]);
}

Ouch that was a {*word*156}e. My brain really hurts.... ;-)
No not hard, but more work than simply calling SaveToStream or
SaveToFile. And the FCL is full of such little annoyances. Many of these
small annoyances can get on people's nerves really quick.
--
Rudy Velthuis (TeamB)
"Basically, I no longer work for anything but the sensation I have while
working."
- Albert Giacometti (sculptor)
 

Re: D8: first impression and uneasy feeling... (long)

At 13:01:15, 19.02.2004, Arthur Hoornweg writes:
Quote
Chris Burrows writes:

>I'm with you, but you also should finish off with an f.Flush() and
>f.Close() shouldn't you?

Shouldn't the GC handle that when the stream goes out of
scope?
Close() would close the file immediately. The GC only recovers memory,
and not other resources. So if you create a Graphics, Brush, or Pen, or
open a file, or change a cursor, etc. you will still have to take care of
those manually (preferrably using try-finally).
--
Rudy Velthuis (TeamB)
"If you gaze long into an abyss, the abyss will gaze back into you."
- Friedrich Nietzsche (1844-1900)