473,836 Members | 2,240 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
101 4006

"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 #51
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 #52
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 #53
"Chris A. R." <so*****@hotmai l.com> wrote in
news:u9******** ******@TK2MSFTN GP10.phx.gbl:
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.


Odd. I'd prefer people with .NET experience. You see, It's better
to know how .NET works, than to know how win32 works, as .NET does a lot
for you and sometimes differently than in win32 (i.e.: there is no
messageing architecture to post messages between threads, threads don't
have their own messagepump etc.

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 #54
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 #55
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 #56
"Daniel O'Connell [C# MVP]" wrote:

"Julie" <ju***@nospam.c om> wrote in message
news:40******** *******@nospam. com...
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.

Try closing the IDE and deleting the .suo file. This sounds like a known bug
that has been cropping up for quite some time(I seem to recall filing a bug
report myself), there is hope it will be fixed in whidbey, but I don't know
if there was any official word on that and considering how hard it is to
reproduce I couldn't test. Though I havn't run into it in about a year it
does happen and it will drive you nuts. It seems to crop up most commonly
with large C# or C++ projects and *may* be related to the size of an output
assembly. I imagine someone else here knows waht I'm talking about and
remembers more details that I do.


If this is a known problem, where is the patch? Not coming, have to wait until
whidbey, standard line from Microsoft.

Let's not forget that this is the 13th rev (or so) of the MS compiler suite.
Bugs like this are not to be expected in a product like this, especially at the
price that it is.
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.

Not to sound harsh, but you pretty much sound like a know-it-all in all of
your posts. Considering the content of said posts I'd say you have a long
way to go before that attitude is anywhere near correct.


I'm hardly a know-it-all, but thanks for the comments. I've been programming
Windows since 3.0 -- I've seen how MS operates, and it is frustrating to try
and eek out a living w/ such shoddy tools and lackluster performance. I'm a
contract programmer, and I don't have the time each day to constantly fiddle w/
the fragility of the system, it costs me *big time*. 10+ years ago, Borland
gave MS some serious compiler competition (and had a far superior product), but
alas, those days are gone, so back to non-innovative buggy MS business as
usual.
Nov 16 '05 #57
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 #58
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 #59

"Julie" <ju***@nospam.c om> skrev i meddelandet
news:40******** *******@nospam. com...
"Daniel O'Connell [C# MVP]" wrote:

"Julie" <ju***@nospam.c om> wrote in message
news:40******** *******@nospam. com...
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.
Try closing the IDE and deleting the .suo file. This sounds like a known bug
that has been cropping up for quite some time(I seem to recall filing a bug report myself), there is hope it will be fixed in whidbey, but I don't know if there was any official word on that and considering how hard it is to
reproduce I couldn't test. Though I havn't run into it in about a year it does happen and it will drive you nuts. It seems to crop up most commonly with large C# or C++ projects and *may* be related to the size of an output assembly. I imagine someone else here knows waht I'm talking about and
remembers more details that I do.


If this is a known problem, where is the patch? Not coming, have to wait

until whidbey, standard line from Microsoft.

Let's not forget that this is the 13th rev (or so) of the MS compiler suite. Bugs like this are not to be expected in a product like this, especially at the price that it is.
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. Not to sound harsh, but you pretty much sound like a know-it-all in all of your posts. Considering the content of said posts I'd say you have a long way to go before that attitude is anywhere near correct.


I'm hardly a know-it-all, but thanks for the comments. I've been

programming Windows since 3.0 -- I've seen how MS operates, and it is frustrating to try and eek out a living w/ such shoddy tools and lackluster performance. I'm a contract programmer, and I don't have the time each day to constantly fiddle w/ the fragility of the system, it costs me *big time*. 10+ years ago, Borland gave MS some serious compiler competition (and had a far superior product), but alas, those days are gone, so back to non-innovative buggy MS business as
usual.


So as a contract programmer you kind of have the option to decide which work
you take. If this is so bad, and to be expected of Microsoft then why not
change
your mo and move to java, linux, borland stuff etc? Or are you neglecting to
say
that even though you feel like this for the MS tools, they are still better
than the
others? Or what gives? Its like saying "I really want to loose weight,
honest *eats
a pound of sugar*" =)

//Andreas
Nov 16 '05 #60

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

Similar topics

123
4013
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...
8
270
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 value of methods with flow control, making writing code that's both readable and consistent, impossible. C# Learner is hindered by his complainging about C# being hindered by its predecessors and the Microsoft marketing department. If C# Learner...
0
9811
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
9657
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
10822
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10532
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
10577
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
9359
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
7774
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...
1
4443
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
4003
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.