473,396 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

I've Had Enough

I've had enough of C#. I've had enough of using parentheses for every
'if' statement. I've had enough of having to mix assignment of return
value of methods with flow control, making writing code that's both
readable and consistent, impossible.

C# is hindered by its predecessors and the Microsoft marketing
department. If Anders had his way, this language would be a one where
readable code isn't a near impossibility for non-trivial code; but no,
Microsoft marketing and C++/Java got in his way. The evidence is
blatently apparent in the language.

Microsoft, the company where money comes before technology, has struck
again. The repercussions affect us all.
Nov 16 '05 #1
26 1086
Hi C# Learner,

"C# Learner" <cs****@learner.here> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
I've had enough of C#. I've had enough of using parentheses for every
'if' statement. I've had enough of having to mix assignment of return
value of methods with flow control, making writing code that's both
readable and consistent, impossible.

C# is hindered by its predecessors and the Microsoft marketing
department. If Anders had his way, this language would be a one where
readable code isn't a near impossibility for non-trivial code; but no,
Microsoft marketing and C++/Java got in his way. The evidence is
blatently apparent in the language.

Microsoft, the company where money comes before technology, has struck
again. The repercussions affect us all.


No language that I've encountered would I consider perfect. Not even
close. Any language that I've seen is either filled with compromises or is
practically useless (or both). Have you found a language you like better, or
are you considering another vocation?

Regards,
Daniel
Nov 16 '05 #2
Daniel Pratt wrote:
Hi C# Learner,
I've had enough of C#. I've had enough of using parentheses for every
'if' statement. I've had enough of having to mix assignment of return
value of methods with flow control, making writing code that's both
readable and consistent, impossible.

C# is hindered by its predecessors and the Microsoft marketing
department. If Anders had his way, this language would be a one where
readable code isn't a near impossibility for non-trivial code; but no,
Microsoft marketing and C++/Java got in his way. The evidence is
blatently apparent in the language.

Microsoft, the company where money comes before technology, has struck
again. The repercussions affect us all.
No language that I've encountered would I consider perfect.


I feel the same :-)
Not even
close. Any language that I've seen is either filled with compromises or is
practically useless (or both). Have you found a language you like better, or
are you considering another vocation?


I've been a Delphi person for some years. Delphi's a language that, I
feel, makes writing clear code easy, and writing hard-to-read code
difficult. With that said, I don't feel Delphi is perfect.

I'm thinking of giving Delphi 8 (for .NET) a spin. Though there is a
problem with that (IMO): it allows global data/routines :(

C# is a nice language in some ways, but it's too inhibited by
C/C++/Java, IMO.

I think that the ideal language would combine the best parts of C# and
Delphi.

I may, at some point in the future, design such a language mainly for
fun, and perhaps even make an MSIL compiler for it. It'd probably be a
massive waste of time though, in the larger scale of things.
Nov 16 '05 #3

"C# Learner" <cs****@learner.here> wrote in message
news:%2******************@TK2MSFTNGP09.phx.gbl...
Daniel Pratt wrote:
Hi C# Learner,
I've had enough of C#. I've had enough of using parentheses for every
'if' statement. I've had enough of having to mix assignment of return
value of methods with flow control, making writing code that's both
readable and consistent, impossible.

C# is hindered by its predecessors and the Microsoft marketing
department. If Anders had his way, this language would be a one where
readable code isn't a near impossibility for non-trivial code; but no,
Microsoft marketing and C++/Java got in his way. The evidence is
blatently apparent in the language.

Microsoft, the company where money comes before technology, has struck
again. The repercussions affect us all.


No language that I've encountered would I consider perfect.


I feel the same :-)
Not even
close. Any language that I've seen is either filled with compromises or is practically useless (or both). Have you found a language you like better, or are you considering another vocation?


I've been a Delphi person for some years. Delphi's a language that, I
feel, makes writing clear code easy, and writing hard-to-read code
difficult. With that said, I don't feel Delphi is perfect.

I'm thinking of giving Delphi 8 (for .NET) a spin. Though there is a
problem with that (IMO): it allows global data/routines :(

C# is a nice language in some ways, but it's too inhibited by
C/C++/Java, IMO.

I think that the ideal language would combine the best parts of C# and
Delphi.

I may, at some point in the future, design such a language mainly for
fun, and perhaps even make an MSIL compiler for it. It'd probably be a
massive waste of time though, in the larger scale of things.


"Different strokes for different folks". While you find Delphi readable
and C style (based on C syntax - i.e., C, C++, Java, C#) code unreadable, I
find Delphi code unreadable. There isn't much you can do except find a
language that you are comfortable with and stick to it.
Nov 16 '05 #4
C# Learner <cs****@learner.here> wrote in news:#g9rpoAHEHA.2576
@TK2MSFTNGP11.phx.gbl:
I've had enough of C#. I've had enough of using parentheses for every
'if' statement. I've had enough of having to mix assignment of return
value of methods with flow control, making writing code that's both
readable and consistent, impossible.

C# is hindered by its predecessors and the Microsoft marketing
department. If Anders had his way, this language would be a one where
readable code isn't a near impossibility for non-trivial code; but no,
Microsoft marketing and C++/Java got in his way. The evidence is
blatently apparent in the language.

Microsoft, the company where money comes before technology, has struck
again. The repercussions affect us all.

Actually, C#/C++/Java were developed by nerds. The real problem is nerds,
not MS. ;-)
Nov 16 '05 #5
C# Learner <cs****@learner.here> wrote:
I've had enough of C#. I've had enough of using parentheses for every
'if' statement. I've had enough of having to mix assignment of return
value of methods with flow control, making writing code that's both
readable and consistent, impossible.


So use VB.NET instead - there's very little not to, if you don't like C
style syntax.

Why get annoyed by a language (and moan in an unconstructive way to
those who *do* like it) when there's a perfectly viable alternative?

Personally I'm very happy that C# is just the way it is, and wouldn't
like it to be any more like VB.NET (aside from having named indexers).
Isn't it a good thing that each of us can have a language which works
the way we want?

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #6
Jon Skeet [C# MVP] wrote:
C# Learner <cs****@learner.here> wrote:
I've had enough of C#. I've had enough of using parentheses for every
'if' statement. I've had enough of having to mix assignment of return
value of methods with flow control, making writing code that's both
readable and consistent, impossible.
So use VB.NET instead - there's very little not to, if you don't like C
style syntax.


Well, that thought did pass through my mind; but then, it's too VB-ish
for my liking.

I /do/ understand that VB.NET is just an interface to MSIL, as is C#,
but I s'pose I'm prejudiced when it comes to anything VB or VB-like :-P

There are more important reasons, though, that I mention in a moment.
Why get annoyed by a language (and moan in an unconstructive way to
those who *do* like it)
I s'pose I'm just interested in people's views on this.
when there's a perfectly viable alternative?
The thing with C# is that it's *the* programming language for .NET (or,
at least, I think so). I think that whenever a new feature is added to
the framework, C# will be the first to get it. C# will be the one that
sticks around longer. C# is the one that has more use in the industry,
and is more widely-used in general. etc.
Personally I'm very happy that C# is just the way it is, and wouldn't
like it to be any more like VB.NET (aside from having named indexers).
There are parts of C# that I like, but some parts are so annoying. The
most annoying and anti-readability element of any C-like language, in my
opinion, is the 'return' construct.

Here's an example of some code that demonstrates my point:

FontTagElement GetFontTagElement()
{
//...

if (length == SingleElementPartCount) {
if (arr[FirstIndex] == FontNameSpecifier) {
string name = arr[FirstIndex];
return new FontTagElement(name);
} else {
int size = TryStringToInt(arr[FirstIndex]);
return new FontTagElement(size);
}
} else if (length == DualElementPartCount) {
string name = arr[FirstIndex];
int size = TryStringToInt(arr[SecondIndex]);

return new FontTagElement(name, size);
} else {
return null;
}
}

To be consistent with simpler uses of 'return', the above code should be
re-written as:

FontTagElement GetFontTagElement()
{
//...

if (length == SingleElementPartCount) {
if (arr[FirstIndex] == FontNameSpecifier) {
string name = arr[FirstIndex];
return new FontTagElement(name);
}
int size = TryStringToInt(arr[FirstIndex]);
return new FontTagElement(size);
}
if (length == DualElementPartCount) {
string name = arr[FirstIndex];
int size = TryStringToInt(arr[SecondIndex]);

return new FontTagElement(name, size);
}
return null;
}

So one can choose either readability or consistency, but not both.

Here's the above slightly changed to show a more Delphi-like returning
construct:

FontTagElement GetFontTagElement()
{
//...

if (length == SingleElementPartCount) {
if (arr[FirstIndex] == FontNameSpecifier) {
string name = arr[FirstIndex];
result = new FontTagElement(name);
} else {
int size = TryStringToInt(arr[FirstIndex]);
result = new FontTagElement(size);
}
} else if (length == DualElementPartCount) {
string name = arr[FirstIndex];
int size = TryStringToInt(arr[SecondIndex]);

result = new FontTagElement(name, size);
} else {
result = null;
}
}

Voilà -- no loss of readability and no inconsistency!
Isn't it a good thing that each of us can have a language which works
the way we want?


That sounds great. If I ever believe to have found such a language,
I'll be sure to let the group know :-P
Nov 16 '05 #7
C# Learner wrote:
I've been a Delphi person for some years. Delphi's a language that, I
feel, makes writing clear code easy, and writing hard-to-read code
difficult. With that said, I don't feel Delphi is perfect.

I'm thinking of giving Delphi 8 (for .NET) a spin. Though there is a
problem with that (IMO): it allows global data/routines :(


The one nice thing about .NET is that it allows for you to code in
"Delphi.NET" and someone to use your work in C# or whatever.

FYI:

http://www.gotdotnet.com/team/lang/

Lists all of the .NET languages that people are working on.

Supposedly here is the pascal work:

http://www.citi.qut.edu.au/research/...entPascal.html

But their web site doesn't respond.

There may be one other Pascal.NET project out there somewhere.

Just promise us that you won't start coding in Cobol.NET.

--
Reginald Blue
"I have always wished that my computer would be as easy to use as my
telephone. My wish has come true. I no longer know how to use my
telephone."
- Bjarne Stroustrup (originator of C++) [quoted at the 2003
International Conference on Intelligent User Interfaces]
Nov 16 '05 #8
// Here is a *Very* common C/C++ pattern used for returning a
// value in a single place withing a method. If you prefer this kind of
// readability, then go ahead and use it. But you won't be unique in
this.

FontTagElement GetFontTagElement()
{
FontTagElement result;
//...

if (length == SingleElementPartCount) {
if (arr[FirstIndex] == FontNameSpecifier) {
string name = arr[FirstIndex];
result = new FontTagElement(name);
} else {
int size = TryStringToInt(arr[FirstIndex]);
result = new FontTagElement(size);
}
} else if (length == DualElementPartCount) {
string name = arr[FirstIndex];
int size = TryStringToInt(arr[SecondIndex]);

result = new FontTagElement(name, size);
} else {
result = null;
}
return result;
}

Chris A.R.

"C# Learner" <cs****@learner.here> wrote in message
news:ON**************@TK2MSFTNGP09.phx.gbl...
Jon Skeet [C# MVP] wrote:
C# Learner <cs****@learner.here> wrote:
I've had enough of C#. I've had enough of using parentheses for every
'if' statement. I've had enough of having to mix assignment of return
value of methods with flow control, making writing code that's both
readable and consistent, impossible.


So use VB.NET instead - there's very little not to, if you don't like C
style syntax.


Well, that thought did pass through my mind; but then, it's too VB-ish
for my liking.

I /do/ understand that VB.NET is just an interface to MSIL, as is C#,
but I s'pose I'm prejudiced when it comes to anything VB or VB-like :-P

There are more important reasons, though, that I mention in a moment.
Why get annoyed by a language (and moan in an unconstructive way to
those who *do* like it)


I s'pose I'm just interested in people's views on this.
when there's a perfectly viable alternative?


The thing with C# is that it's *the* programming language for .NET (or,
at least, I think so). I think that whenever a new feature is added to
the framework, C# will be the first to get it. C# will be the one that
sticks around longer. C# is the one that has more use in the industry,
and is more widely-used in general. etc.
Personally I'm very happy that C# is just the way it is, and wouldn't
like it to be any more like VB.NET (aside from having named indexers).


There are parts of C# that I like, but some parts are so annoying. The
most annoying and anti-readability element of any C-like language, in my
opinion, is the 'return' construct.

Here's an example of some code that demonstrates my point:

FontTagElement GetFontTagElement()
{
//...

if (length == SingleElementPartCount) {
if (arr[FirstIndex] == FontNameSpecifier) {
string name = arr[FirstIndex];
return new FontTagElement(name);
} else {
int size = TryStringToInt(arr[FirstIndex]);
return new FontTagElement(size);
}
} else if (length == DualElementPartCount) {
string name = arr[FirstIndex];
int size = TryStringToInt(arr[SecondIndex]);

return new FontTagElement(name, size);
} else {
return null;
}
}

To be consistent with simpler uses of 'return', the above code should be
re-written as:

FontTagElement GetFontTagElement()
{
//...

if (length == SingleElementPartCount) {
if (arr[FirstIndex] == FontNameSpecifier) {
string name = arr[FirstIndex];
return new FontTagElement(name);
}
int size = TryStringToInt(arr[FirstIndex]);
return new FontTagElement(size);
}
if (length == DualElementPartCount) {
string name = arr[FirstIndex];
int size = TryStringToInt(arr[SecondIndex]);

return new FontTagElement(name, size);
}
return null;
}

So one can choose either readability or consistency, but not both.

Here's the above slightly changed to show a more Delphi-like returning
construct:

FontTagElement GetFontTagElement()
{
//...

if (length == SingleElementPartCount) {
if (arr[FirstIndex] == FontNameSpecifier) {
string name = arr[FirstIndex];
result = new FontTagElement(name);
} else {
int size = TryStringToInt(arr[FirstIndex]);
result = new FontTagElement(size);
}
} else if (length == DualElementPartCount) {
string name = arr[FirstIndex];
int size = TryStringToInt(arr[SecondIndex]);

result = new FontTagElement(name, size);
} else {
result = null;
}
}

Voilà -- no loss of readability and no inconsistency!
Isn't it a good thing that each of us can have a language which works
the way we want?


That sounds great. If I ever believe to have found such a language,
I'll be sure to let the group know :-P

Nov 16 '05 #9
C# Learner wrote:
if (length == SingleElementPartCount) {
if (arr[FirstIndex] == FontNameSpecifier) {
string name = arr[FirstIndex];
return new FontTagElement(name);
} else {
int size = TryStringToInt(arr[FirstIndex]);
return new FontTagElement(size);
}
} else if (length == DualElementPartCount) {
string name = arr[FirstIndex];
int size = TryStringToInt(arr[SecondIndex]);

return new FontTagElement(name, size);
} else {
return null;
}
}


Maybe I'm missing something here, but wouldn't the addition of just a
couple of lines of code, give you the intermediate Result variable and
the readability that you want.

I.e.

FontTagElement Result = null;
if (length == SingleElementPartCount)
{
if (arr[FirstIndex] == FontNameSpecifier)
{
string name = arr[FirstIndex];
result = new FontTagElement(name);
}
else
{
int size = TryStringToInt(arr[FirstIndex]);
result = new FontTagElement(size);
}
}
else
{
if (length == DualElementPartCount)
{
string name = arr[FirstIndex];
int size = TryStringToInt(arr[SecondIndex]);

result = new FontTagElement(name, size);
}
}
return Result;

Rgds Tim.
Nov 16 '05 #10
Chris A. R. wrote:
// Here is a Very common C/C++ pattern used for returning a
// value in a single place withing a method. If you prefer this
kind of // readability, then go ahead and use it. But you won't
be unique in this.

FontTagElement GetFontTagElement()
{
FontTagElement result;
//...

if (length == SingleElementPartCount) {
if (arr[FirstIndex] == FontNameSpecifier) {
string name = arr[FirstIndex];
result = new FontTagElement(name);
} else {
int size = TryStringToInt(arr[FirstIndex]);
result = new FontTagElement(size);
}
} else if (length == DualElementPartCount) {
string name = arr[FirstIndex];
int size = TryStringToInt(arr[SecondIndex]);

result = new FontTagElement(name, size);
} else {
result = null;
}
return result;
}

Chris A.R.

LOL.....snap.
Nov 16 '05 #11
Tim Jarvis wrote:


Maybe I'm missing something here, but wouldn't the addition of just a
couple of lines of code, give you the intermediate Result variable and
the readability that you want.

I.e.

FontTagElement Result = null;
if (length == SingleElementPartCount)
{
if (arr[FirstIndex] == FontNameSpecifier)
{
string name = arr[FirstIndex];
result = new FontTagElement(name);
}
else
{
int size = TryStringToInt(arr[FirstIndex]);
result = new FontTagElement(size);
}
}
else
{
if (length == DualElementPartCount)
{
string name = arr[FirstIndex];
int size = TryStringToInt(arr[SecondIndex]);

result = new FontTagElement(name, size);
}
}
return Result;

Rgds Tim.


Although, please excuse the brain dead casing.... :-(

Nov 16 '05 #12
Tom
After reading your response, Mr C# Learner, I'm convinced you're smoking
crack. I don't find any of your code snippets to be particularly readable
nor significantly different nor unusable in current C#. I don't happen to
like your layout choices as far as brackets, but your either of your first
two layout choices would work.

You are, of course always at liberty to switch to Delphi.NET. However, my
advice would be to refrain from commenting about your perceived detriments
in C# in a C# newsgroup.

Tom
"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om...
C# Learner <cs****@learner.here> wrote:
I've had enough of C#. I've had enough of using parentheses for every
'if' statement. I've had enough of having to mix assignment of return
value of methods with flow control, making writing code that's both
readable and consistent, impossible.


So use VB.NET instead - there's very little not to, if you don't like C
style syntax.

Why get annoyed by a language (and moan in an unconstructive way to
those who *do* like it) when there's a perfectly viable alternative?

Personally I'm very happy that C# is just the way it is, and wouldn't
like it to be any more like VB.NET (aside from having named indexers).
Isn't it a good thing that each of us can have a language which works
the way we want?

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Nov 16 '05 #13
C# Learner wrote:

I'm thinking of giving Delphi 8 (for .NET) a spin. Though there is a
problem with that (IMO): it allows global data/routines :(


What does that mean ? "Global data/routines", curious is all.

For what it is worth, I hold the same opinion as you, in that I don't
think that there is a perfect .NET language out there.

I guess I am lucky in that I have 5 .NET languages (and their IDE's) on
my desktop, actually 6 if you count ILASM. 3 of those I know quite well
and 2 I don't use much, but have on occasion. (see who can name the 5)

I think it comes down to personal preference, and to be frank, unless
as you say, you are willing to roll your own, if you want to do .NET
coding, you will just have to choose one (or mix them) that will get
the job done.

Cheers Tim.
Nov 16 '05 #14

The thing with C# is that it's *the* programming language for .NET (or,
at least, I think so). I think that whenever a new feature is added to
the framework, C# will be the first to get it. C# will be the one that
sticks around longer. C# is the one that has more use in the industry,
and is more widely-used in general. etc.

Like edit and continue? VB.net got there first, after the CLR put in
support.

Like Generics? Both languages have support.

Like named indexers? VB has had it from the beginning.. C# still doesn't.

I'd disagree completely with the fact that C# is *the* language. I prefer
it in most cases, but that's no gague of which language is "it". .net is
specifically designed so that no one language is "it"..... other than MSIL.
And in fact no one language can utilize all capabilities of the CLR (other
than IL.)

I also disagree with the industry. Many places are going VB.NET because of
the number of VB and ASP developers they are retraining.
There are parts of C# that I like, but some parts are so annoying. The
most annoying and anti-readability element of any C-like language, in my
opinion, is the 'return' construct.
[...snip, as it's not's important]
Here's the above slightly changed to show a more Delphi-like returning
construct:

FontTagElement GetFontTagElement()
{
//...

if (length == SingleElementPartCount) {
if (arr[FirstIndex] == FontNameSpecifier) {
string name = arr[FirstIndex];
result = new FontTagElement(name);
} else {
int size = TryStringToInt(arr[FirstIndex]);
result = new FontTagElement(size);
}
} else if (length == DualElementPartCount) {
string name = arr[FirstIndex];
int size = TryStringToInt(arr[SecondIndex]);

result = new FontTagElement(name, size);
} else {
result = null;
}
}

Voilà -- no loss of readability and no inconsistency!

Why not do this yourself? put "return result" at the end, as many people
would recommend you do anyway? (In fact, many would say that you have much
too much control flow in this one function anyway) C# lets you do this, but
doesn't treat "result" as a keyword. Its sparseness of keywords is a
feature, if you ask me --- not a problem.

Isn't it a good thing that each of us can have a language which works
the way we want?


That sounds great. If I ever believe to have found such a language,
I'll be sure to let the group know :-P


So create one. The compiler services in the FCL are more than adequate.
Nov 16 '05 #15
Philip Rieck wrote:

[...]
That sounds great. If I ever believe to have found such a language,
I'll be sure to let the group know :-P


So create one. The compiler services in the FCL are more than adequate.


A problem I see here with creating a new language is that I'd probably
also want to create an IDE for it, if I were looking to use the language
to write GUI applications in, using a form designer.

That'd make it:

- design language;
- create compiler; and
- create IDE.

I'd imagine creating an IDE for it would be extremely time-consuming.
Nov 16 '05 #16
Reginald Blue wrote:
C# Learner wrote:
I've been a Delphi person for some years. Delphi's a language that, I
feel, makes writing clear code easy, and writing hard-to-read code
difficult. With that said, I don't feel Delphi is perfect.

I'm thinking of giving Delphi 8 (for .NET) a spin. Though there is a
problem with that (IMO): it allows global data/routines :(


The one nice thing about .NET is that it allows for you to code in
"Delphi.NET" and someone to use your work in C# or whatever.

FYI:

http://www.gotdotnet.com/team/lang/

[...]


Interesting, thanks!
Nov 16 '05 #17
Tim Jarvis wrote:
C# Learner wrote:
I'm thinking of giving Delphi 8 (for .NET) a spin. Though there is a
problem with that (IMO): it allows global data/routines :(
What does that mean ? "Global data/routines", curious is all.


Meaning that one can create global variables and routines (procedures or
functions) in the way that one can in C++, for example.

i.e.:

void Foo() // global, declared outside of a class
{
}

class Class
{
void Foo() // non-global - a member of a class
{
}
}
For what it is worth, I hold the same opinion as you, in that I don't
think that there is a perfect .NET language out there.

I guess I am lucky in that I have 5 .NET languages (and their IDE's) on
my desktop, actually 6 if you count ILASM. 3 of those I know quite well
and 2 I don't use much, but have on occasion. (see who can name the 5)

I think it comes down to personal preference, and to be frank, unless
as you say, you are willing to roll your own, if you want to do .NET
coding, you will just have to choose one (or mix them) that will get
the job done.

Nov 16 '05 #18
Chris A. R. wrote:
// Here is a *Very* common C/C++ pattern used for returning a
// value in a single place withing a method. If you prefer this kind of
// readability, then go ahead and use it. But you won't be unique in
this.

FontTagElement GetFontTagElement()
{
FontTagElement result;
//...

if (length == SingleElementPartCount) {
if (arr[FirstIndex] == FontNameSpecifier) {
string name = arr[FirstIndex];
result = new FontTagElement(name);
} else {
int size = TryStringToInt(arr[FirstIndex]);
result = new FontTagElement(size);
}
} else if (length == DualElementPartCount) {
string name = arr[FirstIndex];
int size = TryStringToInt(arr[SecondIndex]);

result = new FontTagElement(name, size);
} else {
result = null;
}
return result;
}


Hi Chris,

Yes, this is what I often do, but I get blasted by C# gurus for doing
this, who tell me, "This is C#, not Delphi!"

For clarification, the difference with Delphi's returning mechanism is
that there's no need to declare the result variable, and no need to use
'return result;'.
Nov 16 '05 #19
> I also disagree with the industry. Many places are going VB.NET because o
the number of VB and ASP developers they are retraining


terrible. generally speaking, I'd have more faith in Java & C developers than VB and ASP people. having experienced frustration of working with these VB and ASP people.
Nov 16 '05 #20
C# Learner wrote:
Tim Jarvis wrote:
Meaning that one can create global variables and routines (procedures
or functions) in the way that one can in C++, for example.

i.e.:

void Foo() // global, declared outside of a class
{
}

class Class
{
void Foo() // non-global - a member of a class
{
}
}


I guess this just shows the language's heritage, in fact just like C++,
Delphi is not a "pure" oo language as it is an evolution from pascal (
like C++ is from C )

note, you don't have to write those non class/object routines though ;-)

Rgds Tim.
Nov 16 '05 #21
C# Learner wrote:
For clarification, the difference with Delphi's returning mechanism
is that there's no need to declare the result variable, and no need
to use 'return result;'.


It is important to note though, In Delphi the variable is actually
implicitly declared in every function and only when you have the
extended syntax enabled ($X+) although it is true this is the default,
so many programmers may not even realise that they have the extended
syntax on.

I said in another thread about how language preferences are a very
subjective thing, this feature that you miss in C#, is exacly the thing
that a guy I used to work with hated in Delphi, he hated the fact that
a variable was being declared for him in a hidden way...I must admit, I
haven't even given it a second thought in C#, I just accepted the C#
way of doing things, personally this type of issue for me is a very
minor thing, The thing that sometimes slows me down is I still find
myself thinking about doing things in the "Delphi way", but to be
honest this is more a VCL v's .NET framework thing rather than a
language thing in most cases.

Rgds Tim.

Nov 16 '05 #22
C# Learner wrote:

I've had enough of C#. I've had enough of using parentheses for every
'if' statement. I've had enough of having to mix assignment of return
value of methods with flow control, making writing code that's both
readable and consistent, impossible.

C# is hindered by its predecessors and the Microsoft marketing
department. If Anders had his way, this language would be a one where
readable code isn't a near impossibility for non-trivial code; but no,
Microsoft marketing and C++/Java got in his way. The evidence is
blatently apparent in the language.

Microsoft, the company where money comes before technology, has struck
again. The repercussions affect us all.


I'll take the language any day. It is their sucky, buggy, deficient IDE that
gets my goat, day after day.

So far, their IDE can handle "hello world" class projects, but not much more...
Nov 16 '05 #23
Tim Jarvis wrote:
C# Learner wrote:
Tim Jarvis wrote:
Meaning that one can create global variables and routines (procedures
or functions) in the way that one can in C++, for example.

i.e.:

void Foo() // global, declared outside of a class
{
}

class Class
{
void Foo() // non-global - a member of a class
{
}
}


I guess this just shows the language's heritage, in fact just like C++,
Delphi is not a "pure" oo language as it is an evolution from pascal (
like C++ is from C )


Also, I think some "old-school" Delphites might still want to use global
data/routines, and, secondly, this feature would seemingly help for when
converting to Delphi 8 code from older Delphi code.
note, you don't have to write those non class/object routines though ;-)


I guess I'm just concerned that if it's possible, lots of people will do
it :-) If there's a way, there's a will ;-))

Regards
Nov 16 '05 #24
Julie wrote:
I'll take the language any day. It is their sucky, buggy, deficient IDE that
gets my goat, day after day.

So far, their IDE can handle "hello world" class projects, but not much more...


The IDE seems pretty solid to me; but I guess it could be a case of
different machines, different setups, etc.

How about a deal: you take the language and I take the IDE ;-P
Nov 16 '05 #25
Reginald Blue wrote:
[...]
Just promise us that you won't start coding in Cobol.NET.


Well, I've never touched Cobol, so I can't appreciate how horrible it
might be, but I can tell you for certain that I'd never remotely
consider using Fortran! :-)
Nov 16 '05 #26
C# Learner wrote:

Julie wrote:
I'll take the language any day. It is their sucky, buggy, deficient IDE that
gets my goat, day after day.

So far, their IDE can handle "hello world" class projects, but not much more...


The IDE seems pretty solid to me; but I guess it could be a case of
different machines, different setups, etc.

How about a deal: you take the language and I take the IDE ;-P


Consider yourself lucky. Any commercial-scope project is way outside the
bounds of the IDE.

I'm currently working on one solution composed of maybe 30-40 projects of C#,
managed C++, and native C++, with multiple forms, controls, etc.

It is a battle to get through a day w/o numerous restarts due to the piece
getting hung up on itself. As we speak, the compiler can't build a project
because somewhere else the IDE has a file open (in this case, a debugging pdb
file). Closing all files, and even the project/solution doesn't solve the
problem, the only solution is to restart and rebuild.

A *major* piece of crap, but what should I expect, MS is run by a bunch of
snot-nosed adolescents that think they know everything.
Nov 16 '05 #27

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

123
by: C# Learner | last post by:
I've had enough of C#. I've had enough of using parentheses for every 'if' statement. I've had enough of having to mix assignment of return value of methods with flow control, making writing code...
8
by: Simon | last post by:
I've had enough of C# Learner. I've had enough of his complaining about using parentheses for every 'if' statement. I've had enough of his complaining about having to mix assignment of return...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.