473,854 Members | 1,721 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 4023

"Daniel Pratt" <ko************ ******@hotmail. com> wrote in message
news:u6******** ******@TK2MSFTN GP09.phx.gbl...
Hi C# Learner,

"C# Learner" <cs****@learner .here> wrote in message
news:%2******** ********@TK2MSF TNGP11.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

Hi and sorry but I have to add here some hints to my favorite language:
Smalltalk.
Smalltalk is pure OO and source-code readability is superior. It is
dynamically typed so type declarations are not necessary - it uses keyword
messages
aMessageBox titled: 'I have had enough' confirm: 'Do you like
Smalltalk?' onYes: [ Transcript show: 'read further'; cr ]
instead of
aMessageBox.Sho w( "'Do you like Smalltalk?", "'I have had enough'
confirm" ... );
Unfortunaltley major Smalltalk didn't integrate well in the past into the
Windows OS - VisualWorks / IBM VA have their own philospohy about using the
native OS
IBM VAST uses a Motif layer and VisualWorks emulated widgets.

Dolphin ( www.object-arts.com ) is a nice Windows-Smalltalk with a nice
Windows integration.
Smallscript is an ongoing work to integrate Smalltalk with .NET

We have created our own - still proprietary Smalltalk which has also a deep
OS Integration.
It is not easy to integrate Smalltalk with .NET - Traditionally Smalltalk
dialects have their own Virtual-Machine incl. JIT. CLR is too limited in
many ways to run Smalltalk
effectifley on it. David Simmons ( www.smallscript.org ) who was in the
design team of .NET is creating with S# for .NET.

Be carefull - if you enter the world of Smalltalk programming you will
probably never like to go back - which means today swiming against the
mainstream.

Regards, Frank Lesser, www.lesser-software.com

Nov 16 '05 #71
C# Learner <cs****@learner .here> wrote in news:#g9rpoAHEH A.2576
@TK2MSFTNGP11.p hx.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.


You could always use VB.NET, if you like its constructs better. No-
one is forcing you to use just C#, as VB.NET can do what you want too.
(except a little operator overloading limitations here and there...)

FB
--
Get LLBLGen Pro, the new O/R mapper for .NET: http://www.llblgen.com
My .NET Blog: http://weblogs.asp.net/fbouma
Microsoft C# MVP
Nov 16 '05 #72
Jon Skeet [C# MVP] wrote:
[...]
Personally the first thing I'd ditch from the above is the K&R
bracing...


Well, I have tried the other style (can't remember how it's termed...)
and it is my opinion that the K&R style makes code more readable, as it
places less emphasis on the individual blocks of code.

I'm not expecting everyone to share this viewpoint; I'm merely
expressing it.

I think the K&R bracing style is like Marmite -- you either love it or
you hate it :-)
Nov 16 '05 #73
Jon Skeet [C# MVP] wrote:
[...]
Actually, I find that less readable than the straight returns, myself.
With returns in the middle of the method, I know that that's the end of
the useful path of that method. [...]


Out of interest, then, which of the top two code snippets would you go
for, only taking into account the code around the 'return' statements?

Here're the top two again:

FontTagElement GetFontTagEleme nt()
{
//...

if (length == SingleElementPa rtCount) {
if (arr[FirstIndex] == FontNameSpecifi er) {
string name = arr[FirstIndex];
return new FontTagElement( name);
} else {
int size = TryStringToInt( arr[FirstIndex]);
return new FontTagElement( size);
}
} else if (length == DualElementPart Count) {
string name = arr[FirstIndex];
int size = TryStringToInt( arr[SecondIndex]);

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

FontTagElement GetFontTagEleme nt()
{
//...

if (length == SingleElementPa rtCount) {
if (arr[FirstIndex] == FontNameSpecifi er) {
string name = arr[FirstIndex];
return new FontTagElement( name);
}
int size = TryStringToInt( arr[FirstIndex]);
return new FontTagElement( size);
}
if (length == DualElementPart Count) {
string name = arr[FirstIndex];
int size = TryStringToInt( arr[SecondIndex]);

return new FontTagElement( name, size);
}
return null;
}
Nov 16 '05 #74
C# Learner <cs****@learner .here> wrote:
Jon Skeet [C# MVP] wrote:
[...]
Actually, I find that less readable than the straight returns, myself.
With returns in the middle of the method, I know that that's the end of
the useful path of that method. [...]


Out of interest, then, which of the top two code snippets would you go
for, only taking into account the code around the 'return' statements?


I think I'd use the first one, with the else clause. However, I'd
recode the first part to:

if (length==Single ElementPartCoun t)
{
string name = arr[FirstIndex];
if (name==FontName Specifier)
{
return new FontTagElement( name);
}
else
{
int size = TryStringToInt( name);
return new FontTagElement( size);
}
}

etc

In fact, I'd probably end up declaring name right at the top, as it's
such a common expression in your code.

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #75
Max Power wrote:
C# Learner <cs****@learner .here> wrote in news:#g9rpoAHEH A.2576
@TK2MSFTNGP11.p hx.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. ;-)


"Very nice" *NERDS* definitions :)

http://www.urbandictionary.com/define.php?term=nerd&f=1
http://www.hyperdictionary.com/search.aspx?define=nerd
http://www.computeruser.com/resource...ml?lookup=2995

Marcin
Nov 16 '05 #76
Jon Skeet [C# MVP] wrote:
C# Learner <cs****@learner .here> wrote:
Out of interest, then, which of the top two code snippets would you go
for, only taking into account the code around the 'return' statements?
I think I'd use the first one, with the else clause.


Okay.
However, I'd recode the first part to:

if (length==Single ElementPartCoun t)
{
string name = arr[FirstIndex];
if (name==FontName Specifier)
{
return new FontTagElement( name);
}
else
{
int size = TryStringToInt( name);
return new FontTagElement( size);
}
}

etc

In fact, I'd probably end up declaring name right at the top, as it's
such a common expression in your code.


Oops, yes! Looking back on it, I can't've been fully awake when I wrote
that method :-)

Regards,
Tom
Nov 16 '05 #77
It's hard to find anyone that knows how to write Threading code without
wrapping themselves in knots. Given that, I find the C/C++ programmers are
much more likely to have a clue on how to write working code in a Threaded
environment. I also find that most VB programmers don't understand the
windows messaging architecture, whereas most C/C++ programmers do
understand.

Of course, there are dud C/C++ programmers, but understanding the foundation
of the windows architecture is important for complex programs. So, as lead
engineer and architect at the company I work for, pointy haired boss and
all, I prefer people with C/C++ experience.

Chris A.R.

"microsoft.publ ic.dotnet.langu ages.csharp"
<an*******@disc ussions.microso ft.com> wrote in message
news:A3******** *************** ***********@mic rosoft.com...
I also disagree with the industry. Many places are going VB.NET because of > 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 #78
Chris A. R. <so*****@hotmai l.com> wrote:
It's hard to find anyone that knows how to write Threading code without
wrapping themselves in knots.
True.
Given that, I find the C/C++ programmers are
much more likely to have a clue on how to write working code in a Threaded
environment.


I'm not sure I'd go along with that - they may know how to write
working code in C/C++ in a threaded environment, but that doesn't mean
they'll know the .NET threading model. That's why whenever the
singleton pattern is discussed, there's always someone throwing the
Double Checked Locking Algorithm into the mix, despite it
a) not working as usually presented
b) almost always being a worse approach than various others

:(

I'd like to think I understand threading "better than most" but it
still scares the hell out of me really...

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #79
C# Learner <cs****@learner .here> wrote in news:#g9rpoAHEH A.2576
@TK2MSFTNGP11.p hx.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.


You could always use VB.NET, if you like its constructs better. No-
one is forcing you to use just C#, as VB.NET can do what you want too.
(except a little operator overloading limitations here and there...)

FB
--
Get LLBLGen Pro, the new O/R mapper for .NET: http://www.llblgen.com
My .NET Blog: http://weblogs.asp.net/fbouma
Microsoft C# MVP
Nov 16 '05 #80

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
4017
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
2430
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
9901
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
9752
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,...
0
10685
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10763
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,...
1
7918
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
7082
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
5942
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4563
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4162
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.