|
That's not true... .NET Framework and Java let's you deal with OS directly:
.NET Framework -> PInvoke
Java -> JNI
|
|
|
|
|
Yes, but... why.do.i.have.to.use.a.special.feature.to.deal.with.the.os??? do.i.have.to.ask.permission.to.deal.with.the.os.which.is.supposed.to.be.for.us.programmers.to.deal.with???
To those who understand, I extend my hand.
To the doubtful I demand: Take me as I am.
Not under your command, I know where I stand.
I won't change to fit yout plan. Take me as I am.
|
|
|
|
|
The very first reason is because both platforms don't have equivalents to the entire Windows API (as an example), so they granted a way to deal with the OS directly.
Why you have to use a special feature? Because it's a special feature. If you want to code dealing with the OS directly it's easy... just don't use platforms like .NET or Java.
The idea is that you don't need to handle the OS and how it do the things. It simplifies things, but of course has its disavantages that u mentioned before: some lack of performance.
|
|
|
|
|
A big difference between C# and Java is that if you choose to, you can you use pointers in C# (and thus a whole lot of relatively low level stuff). Also, C# has events, and real events make event based programming a lot nicer (and no, those event-interfaces of Java are not events, not even close)
The Java compiler is also weird, it requires classes to be in their own file, which must have the same name as that class. Such limitations are only annoying, if you'd want to separate your classes like that you'd do it anyway, but Java forces you to do it.
Java has no structs. So how do you define your own value types? Throwing everything except primitive types in the heap isn't very efficient. And there is no operator overloading..
Java really is bad for programmers, I even heard my teacher for Imperative Programming say that "you do not have to worry about things like the stack and other low level things like that" - how could anyone program efficiently while ignoring such things? "Other low level things" might include locality of reference and the cost of indirection, at least looking at his example code leads me to think that he doesn't care about important performance aspects such as those.
|
|
|
|
|
I switched from c++ to java and now I'm back at c++ again. Forcing the class and file name to be same is good: should be that way in all languages IMHO.
Structs? never used them even in c++. They are a leftover from c.
Operator overloading, you don't need it and many times it causes confusion.
The real things that I thought were lacking in Java is the fact that you can't return more than one value from a function, multiple inheritance and the garbage collection, which is a double edged sword (i.e. you have problem of unintended object retention)
|
|
|
|
|
ed welch wrote: Structs? never used them even in c++. They are a leftover from c.
<br />
I Love My Struct's.<br />
There Puprose Is Clear.<br />
They Move Your Data<br />
From Here To There.
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein
"How do you find out if you're unwanted if everyone you try to ask tells you to go away?" - Balboos HaGadol
|
|
|
|
|
programmer poetry??
|
|
|
|
|
And a pun, too:
Rhyming poetry -> English with struct(ure).
Seriously:
Coding is poetry. It is art.
At least if done well.
An application that flows naturally; pleasing to the eyes and to the senses.
A subtle harmony.
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein
"How do you find out if you're unwanted if everyone you try to ask tells you to go away?" - Balboos HaGadol
|
|
|
|
|
Might I suggest "there to here" :P
Then it rhymes!
Perhaps that's what u meant...
“Time and space can be a bitch.”
–Gushie, Quantum Leap
{o,o}.oO( Looking for a great RSS reader? Try FeedBeast! )
|)””’) Built with home-grown CodeProject components!
-”-”-
|
|
|
|
|
Poetic License.
Perhaps my accent confused you???
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein
"How do you find out if you're unwanted if everyone you try to ask tells you to go away?" - Balboos HaGadol
|
|
|
|
|
Of course, of course, I was merely suggesting it.
Clearly you pronounce clear as "clair", then of course it makes perfect sense!
“Time and space can be a bitch.”
–Gushie, Quantum Leap
{o,o}.oO( Looking for a great RSS reader? Try FeedBeast! )
|)””’) Built with home-grown CodeProject components!
-”-”-
|
|
|
|
|
Sure, this site couldn't stand Java to win over all the MS languages, so for once they
embrace it.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
logan1337 wrote: C# and Java in the same option!
Why not? They're virtually the same thing.
Last month, I converted a number of Java objects to C# by copying and pasting the code from Eclipse to VS, then spending a couple of minutes on each object, doing things like editing the syntax for advanced For/For Each loops, casting to avoid covariant problems, and changing the capitalisation of object/method/variable names(that last was most of the work, and is just prettification).
The performance of both packages is almost identical; memory consumption, no real difference; etc.
They might as well be the same language, let alone in the same option.
|
|
|
|
|
Pah! They are worlds apart.
Yes I agree their syntax is almost identical. C#'s syntax was undoubtedly inspired by Java, but also includes a significant amount of C++-inspired syntax.
However, maybe this is all you people mean when you say "language", but to me there's a whole lot more than just the syntax. I hate virtual machines. I hate Java's refusal to play with everyone else. I hate JAR files!!
There's very little about Java I like.
“Time and space can be a bitch.”
–Gushie, Quantum Leap
{o,o}.oO( Looking for a great RSS reader? Try FeedBeast! )
|)””’) Built with home-grown CodeProject components!
-”-”-
|
|
|
|
|
logan1337 wrote: There's very little about Java I like.
Now there's a statement that I can totally get behind.
I think what I hate most about it (jar files are fine, in Windows -- you just double-click 'em and they're almost like real programs!) is the mentality behind it, which shows up in things like naming conventions.
Here's an actual statement I wrote as part of a sample prog for customers, using our own API (so I didn't have much choice about names):
Installation installation = installations.getInstallation(INSTALLATION);
My first pro language was COBOL; I would have summarily executed anyone who had named things so badly that such a line could exist, but such naming seems almost compulsory to Java programmers.
The other biggie is the almost anal attraction to doing things in the most complicated and cumbersome possible way -- usually to avoid using anything to do with Windows.
For example, about six weeks ago, a colleague was tasked with automating part of our release notes documentation, so he fired off with Java, then of course had to get XML involved, and that led on to DocBook, etc. etc. etc, and needed half a dozen engineers to contribute a ridiculous amount of time each.
Last week, I got sick of waiting, so I rattled of a VB Word macro that does the whole thing at the click of a button in a Word doc. It took 7.5 hours (tables and various template-specific text styles are involved, so it's reasonably complicated) (Look at me: I'm ashamed that it took me so long!)
The idiot's colleague's response to this?
"Yeah, but my way, it would have been perfect!"
I agreed. It was a perfect waste of time, effort, and (lots of) money -- and is now scrapped, because we already have the perfect, simple, 7.5-man-hour-total-cost solution.
So yeah, you can say this again for me:
logan1337 wrote: There's very little about Java I like.
|
|
|
|
|
“Time and space can be a bitch.”
–Gushie, Quantum Leap
{o,o}.oO( Looking for a great RSS reader? Try FeedBeast! )
|)””’) Built with home-grown CodeProject components!
-”-”-
|
|
|
|
|