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

<snip>

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.


I have to disagree. I find it important to understand not only the tool that
is in your hand, but where it came from and the design choices that were
made in building it (i.e. the limitations and why they exist).

It may be that you can do 95% or more of your work without needing to know
what lies below the surface, but the small percentage that is left can be
the difference between relying on voodoo programming and being able to
design a good solution or fix a difficult problem. You can be a good .net
programmer without a win32 background, but it's a lot tougher then for
someone with a good win32 background.

Programmers certainly need experience in .net, but if that's all they have
there will be some problems that are just plain mysterious (and perhaps
unsolvable) to them. Part of that is because the .net platform is still
immature and you can't go very far before it p/invokes back to a win32 API
or COM object. I think you'll find that a number of the
limitations/restrictions of the .net platform and the BCL are directly
derived (even when it's not obvious) from the platform.

As the platform matures more services will be ported to .NET so this will be
less of a problem, but that could be a long ways in the future.

Dave
Nov 16 '05 #121
"Chris A. R." <so*****@hotmai l.com> wrote in
news:uA******** ******@TK2MSFTN GP10.phx.gbl:
So, the comparison I was making was in pre-.Net, windows directed
languages only. While there is no message pump for threads, it is
important to understand how threading works on the GUI components and
how Invoke, BeginInvoke, and EndInvoke actually do work with the GUI's
message architecture in these situations.
I disagree. The reason for that is that .NET is a layer abstracting
away the win32 architecture. It provides a new API. If a developer reads
and understands the .NET methods like BeginInvoke() and friends (there was
a nice discussion about these on the DOT-NET developmentor list recently),
it *should* be fine. After all, those are the routines a developer works
with. Even if the developer understands that below the surface WM_*
messages are sent to messagepumps, it doesn't matter, as the developer
can't do a thing about it.
Continuing on that concept, there are often times when knowing the
underlying architecture can make a programmers ability to program .Net
programs a lot better.


This is partly true for winforms control usage, for the rest, I
don't think it is that important. Partly true as in: why do I have to do
an Application.DoE vents() here and why will my program lock up when I do
that right before a TreeView.EndUpd ate() ? For the rest, it's out of your
hands anyway, the information that disabling a textbox control will call
Win32's SendMessage() below the surface is great, but it only helps you
understand why some things work differently than expected, it can't help
you fix it.

Frans

--
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 #122
"Dave" <no************ ****@wi.rr.com> wrote in
news:uO******** ******@TK2MSFTN GP11.phx.gbl:
<snip>
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.

I have to disagree. I find it important to understand not only the tool
that is in your hand, but where it came from and the design choices that
were made in building it (i.e. the limitations and why they exist).


if you require that information, OR the documentation is not up to
par OR the API is not up to par.
It may be that you can do 95% or more of your work without needing to
know what lies below the surface, but the small percentage that is left
can be the difference between relying on voodoo programming and being
able to design a good solution or fix a difficult problem. You can be a
good .net programmer without a win32 background, but it's a lot tougher
then for someone with a good win32 background.
I fail to see that. I mean: does it help you if you understand how
Win32's messaging works? It's an asynchronous architecture. .NET is not
(unless you use asynchronous routines). It's about concepts: what's a
thread, what's MTA, what's STA, how do threads communicate, what's the
difference between a thread and a process in windows terms (because on
Unix it's different). What's thread local storage etc. etc. If you
understand these concepts, you can pick up the .NET documentation and
check for implementations of these concepts. After that, use the
implementations on .NET. I don't see why it is important to understand how
it works below the surface. Ok, it's nice to know from a geeky point of
view, but for the rest I don't think it's important.

I think the reasoning behind your point is that in win32 you were
forced to understand the concepts first, because it is a big giant api and
no namespaces/classes which group the functionality (ok, dll's perhaps,
but you start with the platform SDK, 1 big api doc). In .NET it is easy to
run into a Thread class, oh what can it do? Oh that's nice, let's try...
*poof*. However if people understand the concepts, I don't think you need
to understand what win32 does below the surface.
Programmers certainly need experience in .net, but if that's all they
have there will be some problems that are just plain mysterious (and
perhaps unsolvable) to them. Part of that is because the .net platform
is still immature and you can't go very far before it p/invokes back to
a win32 API or COM object. I think you'll find that a number of the
limitations/restrictions of the .net platform and the BCL are directly
derived (even when it's not obvious) from the platform.


true, however the knowledge of these limitations is also learned
from using .NET: 'it can't do this'. Why it can't do this is not
important, because you can't change it anyway :)

For one area I agree with you: COM+ / ServicedCompone nt.

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 #123
> >
I have to disagree. I find it important to understand not only the tool
that is in your hand, but where it came from and the design choices that
were made in building it (i.e. the limitations and why they exist).
if you require that information, OR the documentation is not up to
par OR the API is not up to par.


The documentation is good enough for most cases but there are many times
when it isn't. This was especially true in the early days of .net - it's
gotten a lot better.
I fail to see that. I mean: does it help you if you understand how
Win32's messaging works? It's an asynchronous architecture. .NET is not
(unless you use asynchronous routines). It's about concepts: what's a
thread, what's MTA, what's STA, how do threads communicate, what's the
difference between a thread and a process in windows terms (because on
Unix it's different). What's thread local storage etc. etc. If you
understand these concepts, you can pick up the .NET documentation and
check for implementations of these concepts. After that, use the
implementations on .NET. I don't see why it is important to understand how
it works below the surface. Ok, it's nice to know from a geeky point of
view, but for the rest I don't think it's important.

Some of its pure geek curiousity, but often it makes a practical difference.
For one, there's a lot of win32-isms in the System.Forms classes. There is
some behavior that can only be explained by knowing that behind the scenes a
bit of functionality was implemented by posting a message to a hidden
window.
I think the reasoning behind your point is that in win32 you were
forced to understand the concepts first, because it is a big giant api and
no namespaces/classes which group the functionality (ok, dll's perhaps,
but you start with the platform SDK, 1 big api doc).
Agreed. But I don't think .NET is all that different. I regard .NET as an
operating system, and to write non-trivial, effective code you have to
understand a lot. Sure, you can write a .NET HelloWorld in a flash, but I
can do that just as fast in MFC. You can't get far before you hit a wall
that you can't get beyond until you understand lots of other concepts.
In .NET it is easy to
run into a Thread class, oh what can it do? Oh that's nice, let's try...
*poof*. However if people understand the concepts, I don't think you need
to understand what win32 does below the surface.

Threads are interesting. You can get a lot done without knowing much about
win32, but even here you cannot get far or do a lot without needing to
understand what lies below the surface. Here's one example....why are .net
mutexes visible across processes on the same machine but .net events are
not? Another is that a thread must be in a runnable state before certain
operations will take affect (a ThreadAbort wont actually be delivered until
the thread is running).

Another aspect of threading that is directly related to win32 is the entire
topic of exception handling. This is built directly on top of the SEH
mechanism of win32, and if you want to understand why things happen as they
do you must understand win32 SEH. From what I've read of the exception
portion of the ECMA spec, it was written around some win32 assumptions.

In the original ROTOR sources, because the exception handling was built on
top of a UNIX model the actual delivery of some exception semantics is
subtly different.
Programmers certainly need experience in .net, but if that's all they
have there will be some problems that are just plain mysterious (and
perhaps unsolvable) to them. Part of that is because the .net platform
is still immature and you can't go very far before it p/invokes back to
a win32 API or COM object. I think you'll find that a number of the
limitations/restrictions of the .net platform and the BCL are directly
derived (even when it's not obvious) from the platform.


true, however the knowledge of these limitations is also learned
from using .NET: 'it can't do this'. Why it can't do this is not
important, because you can't change it anyway :)


Hmmm. I agree in part. Quite often what I've found is that a rule is stated
as "Always do this" or "Never do that" but given sufficient understanding of
where those rules come from they should really be stated as "Almost always
do this" or "Almost never do that". It is knowing when it is allowable to
deviate, or when your circumstances are sufficiently different that you can
"do that" that makes all the difference. This can only come from a deep
understanding of the platform.

For one area I agree with you: COM+ / ServicedCompone nt.


I have the happy pleasure of never working with those :-) So I've skipped
over many of the COM problems (apartment models are just nuts).

Nov 16 '05 #124

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
11031
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
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,...
0
10371
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9518
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
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();...
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
3
3188
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.