473,838 Members | 1,694 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
123 4013
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 #31
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 GetFontTagEleme nt()
{
FontTagElement result;
//...

if (length == SingleElementPa rtCount) {
if (arr[FirstIndex] == FontNameSpecifi er) {
string name = arr[FirstIndex];
result = new FontTagElement( name);
} else {
int size = TryStringToInt( arr[FirstIndex]);
result = new FontTagElement( size);
}
} else if (length == DualElementPart Count) {
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 #32
> 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 #33
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 #34
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 #35
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 #36
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 #37
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 #38
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 #39
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 GetFontTagEleme nt()
{
FontTagElement result;
//...

if (length == SingleElementPa rtCount) {
if (arr[FirstIndex] == FontNameSpecifi er) {
string name = arr[FirstIndex];
result = new FontTagElement( name);
} else {
int size = TryStringToInt( arr[FirstIndex]);
result = new FontTagElement( size);
}
} else if (length == DualElementPart Count) {
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 #40

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

Similar topics

23
264
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 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...
101
4010
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 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...
26
1125
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 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...
98
2428
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 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...
0
9853
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9696
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10644
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9423
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7827
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7014
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5681
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5864
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3131
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.