Is c# so easy? Easier than c? Think again...

J

jbailo

Subject: dotnet is a farce.

You know, I was always impressed with
the way one could write a http program
with c# or java. To me, it showed how
'superior' these languages are because
they made it so 'easy' to
set up connection points, open a socket,
send the request.

But, I never really know how to do it in
c! So I wasn't comparing it with anything.
Then, I just received one of my four new
books yesterday, 'Advanced Linux Programming'
from New Riders, and there was some sample
code for opening a socket and reading
http data.

IT'S THE SAME THING AS IN C# !!!!!!

If anything, it's less and more elegant.

Tell me that:

connect(socket_fd, &name, sizeof( struct sockaddr_in))

a SINGLE line that sets up the connection followed
by a while loop to read the data is not
THE SAME EXACT SYNTAX as in c# for doing the same thing.

See -- UNIX has always had 'ASSEMBLIES' -- or SYSCALLS

-- or OPERATING SYSTEM LEVEL LIBRARIES AND METHODS

DOT NET IS A FARCE (!)(!)(!)(!)(!)
 
F

Fergus Henderson

jbailo said:
Subject: dotnet is a farce.

You know, I was always impressed with
the way one could write a http program
with c# or java. To me, it showed how
'superior' these languages are because
they made it so 'easy' to
set up connection points, open a socket,
send the request.

That is mainly a matter of the relative strengths of the libraries,
rather than the language.

The _language_ advantages of C# or Java compared with C are mainly the
following: greater determinism and safety (i.e. the absence of most of
the unspecified and undefined behaviour which is rife throughout C),
automatic memory management (garbage collection), better support for
encapsulation and OOP, and exception handling.
But, I never really know how to do it in c! ....
IT'S THE SAME THING AS IN C# !!!!!!

Apparently you still don't know.
Tell me that:

connect(socket_fd, &name, sizeof( struct sockaddr_in))

a SINGLE line that sets up the connection followed
by a while loop to read the data is not
THE SAME EXACT SYNTAX as in c# for doing the same thing.

It's not. That single line of C code will *silently ignore any failures*.
I'm pretty sure the corresponding C# or Java code would throw an
exception, ensuring that the failure will either be dealt with by the
caller or eventually reported to the user.
DOT NET IS A FARCE (!)(!)(!)(!)(!)

It didn't take much for you to leap to that conclusion, did it?
 
T

ToddT

pls, don't feed the troll.


That is mainly a matter of the relative strengths of the libraries,
rather than the language.

The _language_ advantages of C# or Java compared with C are mainly the
following: greater determinism and safety (i.e. the absence of most of
the unspecified and undefined behaviour which is rife throughout C),
automatic memory management (garbage collection), better support for
encapsulation and OOP, and exception handling.


Apparently you still don't know.


It's not. That single line of C code will *silently ignore any failures*.
I'm pretty sure the corresponding C# or Java code would throw an
exception, ensuring that the failure will either be dealt with by the
caller or eventually reported to the user.


It didn't take much for you to leap to that conclusion, did it?
 
M

mlw

Fergus said:
That is mainly a matter of the relative strengths of the libraries,
rather than the language.

The _language_ advantages of C# or Java compared with C are mainly the
following: greater determinism and safety (i.e. the absence of most of
the unspecified and undefined behaviour which is rife throughout C),
automatic memory management (garbage collection), better support for
encapsulation and OOP, and exception handling.

I would use C++ over .NET or Java anytime.

..NET and Java do not have pointers, therefor it will always be more
difficult to perform various operations. They have a common runtime
interpreter, yea, sure, there is a JIT compiler, but this is an
optimization of the classic tokenized interpreter.

I like "real code." When I see something I don't understand, I want to look
at the assembly output. I want to know and be able to audit what is being
run. Runtime environments are not reliable. When newer version come out,
older APIs are depricated. Bugs in the JIT can be a cause for major
difficulties, just as in a real compiler, but the difference is that you
can inspect the code and alter the code generation as nessisary.

The biggest part of puzzle is portability. You are only as portable as the
makers of your virtual machine. Think about trying to get the same version
of Java for all your supported platforms, if you can, that is.

Virtually every platform has a C/C++ compiler, the same can not be said
about Java, and certainly not .NET.

What, by the way, is the "unspecified and undefined behavior" in C or C++?
 
F

Fergus Henderson

mlw said:
I would use C++ over .NET or Java anytime.

.NET and Java do not have pointers,

FYI .NET does have pointers. Please go and read some more technical
details about .NET, and criticize what it actually is, rather than some
figment of your imagination.
What, by the way, is the "unspecified and undefined behavior" in C or C++?

See Annex J of the 1999 C standard. It lists more than a hundred
different aspects of C which have either unspecified, undefined, or
implementation-defined behaviour. There are also other aspects of C
that result in undefined behaviour which are not specified in that list.
 
J

john bailo

Wed, 05 Nov 2003 10:02:46 -0600, ToddT,
pls, don't feed the troll.

that's right -- call argument you can't defeat a 'troll'

go home to your mama and eat some warm cookies and
milk, because your technical skills are so weak
you can't argue the benefits of your own language.

cry baby
cry baby
cry baby
 
J

John Young

I agree with your comment, Miha.
I used to find these groups boring sometimes, but now 'J "The Muppet" Bailo'
is on the scene, I can have a good laugh when I get back from work after
doing some real programming! You know bailo, real programming is creating
software that works reliably, doesn't take years to create, and works for
more than 5% of computer users (eg. Windows!). Get real bailo, users seem
to want Windows software so that is what we give them.
If users decide that they want Linux software, then we will write that!

In the meantime, I'm writing software for the OS that users want to use (oh,
and pay me for !).

Hehh

John
 
G

Guest

Another thing, MC++ is getting an overhaul to dump thise mess __keywords

And another feature ... CUSTOM ATTRIBUTES..

with 2.0 its a rich environment, while you are mopping up yer maintenance
shti ill be releasing rich solutions before you even start emliminating
youre bugs and doing boring things like housekeeping.
 
T

The Ghost In The Machine

In comp.os.linux.advocacy, jbailo
<[email protected]>
wrote
Subject: dotnet is a farce.

You know, I was always impressed with
the way one could write a http program
with c# or java. To me, it showed how
'superior' these languages are because
they made it so 'easy' to
set up connection points, open a socket,
send the request.

But, I never really know how to do it in
c! So I wasn't comparing it with anything.
Then, I just received one of my four new
books yesterday, 'Advanced Linux Programming'
from New Riders, and there was some sample
code for opening a socket and reading
http data.

IT'S THE SAME THING AS IN C# !!!!!!

If anything, it's less and more elegant.

Tell me that:

connect(socket_fd, &name, sizeof( struct sockaddr_in))

a SINGLE line that sets up the connection followed
by a while loop to read the data is not
THE SAME EXACT SYNTAX as in c# for doing the same thing.

See -- UNIX has always had 'ASSEMBLIES' -- or SYSCALLS

-- or OPERATING SYSTEM LEVEL LIBRARIES AND METHODS

DOT NET IS A FARCE (!)(!)(!)(!)(!)

You're confusing a *lot* of issues here. For starters,
are you referring to:

[1] the programming of a client which can use HTTP to
transfer data from client to server and back to client?
[2] the programming of a server which is HTTP-aware?
[3] something else?

I know Java has java.net.URL and java.net.URLConnect;
those help a *lot*. I suspect C# has something
similar. Java, however, also has java.net.Socket and
java.net.ServerSocket, if one really wants to bypass Java's
URL handling -- and ServerSocket is required if one wants
to process incoming server requests anyway, at some level.

I can't say I know whether C# has something similar but they
might be able to either have their own variant of URL or
they can simply call WinInet or HTTP subpackages (both available
in Windows). WinInet is roughly equivalent to URL/URLConnection,
albeit more complicated (and with a somewhat procedural focus, as
opposed to Java's method-based one -- one passes in handles
of the appropriate type into these routines).
 
E

Eric Matteson

jbailo said:
Subject: dotnet is a farce.

You know, I was always impressed with
the way one could write a http program
with c# or java. To me, it showed how
'superior' these languages are because
they made it so 'easy' to
set up connection points, open a socket,
send the request.

But, I never really know how to do it in
c! So I wasn't comparing it with anything.
Then, I just received one of my four new
books yesterday, 'Advanced Linux Programming'
from New Riders, and there was some sample
code for opening a socket and reading
http data.

IT'S THE SAME THING AS IN C# !!!!!!

If anything, it's less and more elegant.

Tell me that:

connect(socket_fd, &name, sizeof( struct sockaddr_in))

a SINGLE line that sets up the connection followed
by a while loop to read the data is not
THE SAME EXACT SYNTAX as in c# for doing the same thing.

See -- UNIX has always had 'ASSEMBLIES' -- or SYSCALLS

-- or OPERATING SYSTEM LEVEL LIBRARIES AND METHODS

DOT NET IS A FARCE (!)(!)(!)(!)(!)
I like the C language the best because it makes the most sense.
Both C and C++ support goto label, which is similar to jmp label
in assembley language.
goto statements are needed in most non-trivial programs.
I hate JAVA because JAVA does not have required goto statements.
The simple traditional C language is the best high-level language
that I know of.
(e-mail address removed)
 
J

Jeff Relf

Hi jbailo , You say :
" IT'S THE SAME THING AS IN C# !!!!!! "

Exactly ... And it's running the same code too .

Today's libraries are designed to run under any language .

But unlike scripts , C++ code can run stand alone .

And C++ doesn't treat you like an idiot ,
You can hack into structures as much as you want ...
And it has a nicer debugger too .

Does anyone know where I can find a Win98 debugger
that steps from statement to statement ?
( Instead from line to line )

Does anyone know where I can find a Win98 compiler
who's macros aren't line oriented ?
 
M

mlw

Jeff said:
Hi jbailo , You say :
" IT'S THE SAME THING AS IN C# !!!!!! "

Exactly ... And it's running the same code too .

Today's libraries are designed to run under any language .

But unlike scripts , C++ code can run stand alone .

And C++ doesn't treat you like an idiot ,
You can hack into structures as much as you want ...
And it has a nicer debugger too .

Does anyone know where I can find a Win98 debugger
that steps from statement to statement ?
( Instead from line to line )

Just drop in to assembly mode. Trace the instructions.
Does anyone know where I can find a Win98 compiler
who's macros aren't line oriented ?

What do you mean "line oriented?" As a little foot note, the compiler,
strictly speaking, doesn't handle the macros, the preprocessor does. Many
people create their own pre-preprocessors for various languages, sort of
like embedded SQL compilers.
 
W

William Ryan

Fergus:

Why is it that so many people persist in this myth of No Pointers? I use
them all the time in the Compact Framework and a few legacy apps. Then as I
just finish debugging something which uses pointers, Bailo and or on of his
few Homies pipes up with this myth again.

How can they program in C, C++ and Java and be this clueless? (I truly
wonder how many memory leaks and dangling pointers exist in their 'elite'
C++ code)

Cheers,

Bill
 
M

mlw

William Ryan wrote:

(I truly
wonder how many memory leaks and dangling pointers exist in their 'elite'
C++ code)

Well, that is always a matter of design and understanding what you are
building. Rules on how and where memory is used. Knowing when to use
automatics, alloca, or malloc.

A well designed program does not call malloc unless absolutely nessisary.
When it does need to allocate memory from the heap, it is not done in the
critical path and it is done in a sufficiently centralized place.

In fact "malloc" should never be called directly in a non-trivial program.
Like socket calls and file operations, memory managment should be designed
in from the start.

Why do this when Java and .NET have garbage collection? Well, because memory
management is probably one of the most important jobs for the software
designer for stability, efficiency, and performance.
 
J

Jeff Relf

Hi mlw , You say :
" What do you mean ' line oriented ? ' "

You must be a young whipper snapper .

In the early days ,
some editors would only edit one line at a time .

They were " Line Oriented " .

My preprocessor , in MS Dev C++ 6.0 ,
won't let me do something like this :

int X; #define Mac1(X) X++; #define Mac2(X) X--; Mac1(X);

If there a better preprocessor ?
 
J

Jeff Relf

[ Reposted , This time to the right groups ]

Hi mlw , You say :
" What do you mean ' line oriented ? ' "

You must be a young whipper snapper .

In the early days ,
some editors would only edit one line at a time .

They were " Line Oriented " .

My preprocessor , in MS Dev C++ 6.0 ,
won't let me do something like this :

int X; #define Mac1(X) X++; #define Mac2(X) X--; Mac1(X);

If there a better preprocessor ?
 
J

Jeff Relf

Hi Eric Matteson , You say :
" The simple traditional C language is
the best high-level language that I know of . "

As an old timer myself , I tend to agree with you .

But you can can convert all of your old C programs
into C++ programs in just a few minutes .

Why do this ?

Because I've found that
there is more documentation and support for C++ .

If you stick with C you'll be left behind .

COM , DirectX , etc. have little support for C .

For example :
#include <dsound.h> // DSound.LIB
#include <ddraw.h>
// Dxerr8.lib DDraw.LIB DInput8.lib
// DXguid.LIB DSound.LIB WinMM.LIB
#include <dinput.h>
#include <Dxerr8.h> // MAKE_DDHRESULT( 150 )
#include <olectl.h>

For example , below is some C++ code that
will open .JPGs , .GIFs , .BMPs etc. :

Notice the IPicture *IPic; , OleLoadPicturePath();
and the IPic->get_Handle((OLE_HANDLE*)&BM);

IPicture *IPic; typedef HBITMAP BM_T;

BM_T _BM( int Ty, char *P) { ushort PP[400]; char B[400];
Str( B, "%s\\%s", Working[ Ty], P);
mbstowcs( PP, B, 400 ); short S= 0; BM= 0;
if ( OleLoadPicturePath(
PP, 0, 0, 0, IID_IPicture, (void**)& IPic)) return 0;
if ( IPic->get_Type( & S )<0 || S != PICTYPE_BITMAP||
IPic->get_Handle(( OLE_HANDLE*)& BM)< 0|| !BM) Rel( IPic)
return BM; }
 
J

jbailo

Hi Eric Matteson , You say :
" The simple traditional C language is
the best high-level language that I know of . "

As an old timer myself , I tend to agree with you .

But you can can convert all of your old C programs
into C++ programs in just a few minutes .

Why do this ?

c b aced by Czzzzz.
 
J

jbailo

Hi jbailo , You say : " c b aced by Czzzzz "

What is Czzzzzzzzzz ?

Day Is C#

Day Is C++++++

Day Is C

I uzzzz Czzzzz

Czzzz assbackass, RPNzzz,
In-Fixzzzing-Notashunzzzz.

you don't know what hood is good
until you is programmzzz in Czzzzzzz

Sa Czzzz
Izn, Sa c#
Izn, Sa c
Izn, Sa c++++++

Sa Czzzzzzz

Exclamation POINT (!)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top