no more java!

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

lukatmyshu

Senior member
Aug 22, 2001
483
1
0
Originally posted by: FeathersMcGraw
Originally posted by: Descartes
Originally posted by: FeathersMcGraw
Originally posted by: Elemental007 I program in C and motorola assembly. True EE. None of this BS high level crap that never actually plays out :)
You've got a mighty curious view of the world where C isn't a high-level language.
I'd say that you do. C is is only high-level when you consider assembly, and any other language in use today are considerably higher than C.
That logic is like saying that dogs aren't mammals because apes and humans are. High-level languages abstract the underlying architecture from the programmer. Java does it a lot more than C, but you can write C code without knowing anything about the CPU instruction set of the box you're running on.

Exactly ... although the only reply I would have to do is that C DOES have the capability to execute assembly code, so in some way you could write a program in C that was essentially assembly.
 

Zombie

Platinum Member
Dec 8, 1999
2,359
1
71
Originally posted by: FeathersMcGraw
Originally posted by: Descartes
Originally posted by: FeathersMcGraw
Originally posted by: Elemental007
I program in C and motorola assembly. True EE. None of this BS high level crap that never actually plays out :)

You've got a mighty curious view of the world where C isn't a high-level language.

I'd say that you do. C is is only high-level when you consider assembly, and any other language in use today are considerably higher than C.

That logic is like saying that dogs aren't mammals because apes and humans are.

High-level languages abstract the underlying architecture from the programmer. Java does it a lot more than C, but you can write C code without knowing anything about the CPU instruction set of the box you're running on.


agreed, but I feel that languages like Scheme and lisp to a certain extent are even closer to assembly language than C.
 

Zombie

Platinum Member
Dec 8, 1999
2,359
1
71
Does java have the concept of Protected and Friends ? I forget, its been a while...just curious.
 

FeathersMcGraw

Diamond Member
Oct 17, 2001
4,041
1
0
Originally posted by: lukatmyshu

Exactly ... although the only reply I would have to do is that C DOES have the capability to execute assembly code, so in some way you could write a program in C that was essentially assembly.

I admit I'm not up on what ANSI considers standard, but I'm willing to go out on a limb and say that capability is compiler-specific. If you were to go with vanilla K&R C, you wouldn't be able to get at the innards of the architecture short of doing buffer overrun sorts of hacks, and once you go down that road, you're not programming in the language any more.
 

FeathersMcGraw

Diamond Member
Oct 17, 2001
4,041
1
0
Originally posted by: Zombie
Does java have the concept of Protected and Friends ? I forget, its been a while...just curious.

Protected, yes. Friend, sort of. If you don't specify an access modifier, you get "package" access, which allows any other class in the same package to treat that field as if it were publicly accessible.
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0
Originally posted by: FeathersMcGraw
Originally posted by: Descartes
Originally posted by: FeathersMcGraw
Originally posted by: Elemental007
I program in C and motorola assembly. True EE. None of this BS high level crap that never actually plays out :)

You've got a mighty curious view of the world where C isn't a high-level language.

I'd say that you do. C is is only high-level when you consider assembly, and any other language in use today are considerably higher than C.

That logic is like saying that dogs aren't mammals because apes and humans are.

High-level languages abstract the underlying architecture from the programmer. Java does it a lot more than C, but you can write C code without knowing anything about the CPU instruction set of the box you're running on.

Don't patronize me. What you linked to me is a horribly antiquated definition which doesn't include the subsequent generations of languages which essentially render C *low-level* by comparison.

MASM has higher-level macros, so are you saying it's a high-level language (dialect) because it abstracts away things like procedure prolog/epilog?
 

DT4K

Diamond Member
Jan 21, 2002
6,944
3
81
Originally posted by: iotone
java has tons and tons of good, useful functions, but the whole virtual machine thing just makes it run so slow...

i guess it just depends on what you're using java for, tho it is getting better.
That's why there is the move towards native compiled java.
Defeats the whole portability concept, but makes it fast.

Of course, it does depend on what you are using it for.
Most business systems are database dependent. So for 99% of your code, the database transactions are going to be the rate limiting step. The amount of time you lose by running interpreted code instead of compiled is irrelevant compared to the amount of time it takes for database retrieval.

People tend to sometimes think too much about writing fast code. Sometimes other things, like logical, readable code, are more important. I've seen devs write really awkward code just so their function runs in 1/100th of a second instead of 1/10th of a second. See, see, it's ten times as fast. Yeah, but ask any user if they can tell a difference.
 

FeathersMcGraw

Diamond Member
Oct 17, 2001
4,041
1
0
Originally posted by: Descartes
What you linked to me is a horribly antiquated definition which doesn't include the subsequent generations of languages which essentially render C *low-level* by comparison.

MASM has higher-level macros, so are you saying it's a high-level language (dialect) because it abstracts away things like procedure prolog/epilog?

MASM is still tied to the architecture of the computer it targets, so macro capability doesn't make it a high-level language.

This is essentially a semantic argument at this point. I doubt either one of us disagrees that Java is a higher-level language than C, but just because you think my definition is antiquated doesn't make it so.

FWIW, the Jargon Dictionary splits the difference between our viewpoints.