Is implementing a Java class procedural programming?

S

Stefan Ram

tenxian said:
Is implementing a Java class a process of procedural programming?

There is no single globally accepted definition of »procedural
programming«. So you should give the terminology you refer to.

One might say that Java programming is procedural, because
Java methods could be interpreted to be »procedures«. We do
not have to push arguments onto the stack or load them into
registers and then jump to some subroutine anymore. But one
rarely does say this, because there rarely is need to point
this out.
 
T

tenxian

There is no single globally accepted definition of »procedural
programming«. So you should give the terminology you refer to.

One might say that Java programming is procedural, because
Java methods could be interpreted to be »procedures«. We do
not have to push arguments onto the stack or load them into
registers and then jump to some subroutine anymore. But one
rarely does say this, because there rarely is need to point
this out.

So when we are designing and defining classes, Java is an object-
oriented programming language, it is a procedural programming
language while we are implementing methods.
 
T

tenxian

There is no single globally accepted definition of »procedural
programming«. So you should give the terminology you refer to.

One might say that Java programming is procedural, because
Java methods could be interpreted to be »procedures«. We do
not have to push arguments onto the stack or load them into
registers and then jump to some subroutine anymore. But one
rarely does say this, because there rarely is need to point
this out.

So Java is a programming language that combines object-oriented
programming and procedural programming, right?
 
S

Stefan Ram

tenxian said:
So Java is a programming language that combines object-oriented
programming and procedural programming, right?

Java does not support all facets of object-oriented programing
(as they are supported in in Smalltalk). For example, blocks
of code are not objects in Java and numerals do not have
objects as their value.

But surely everything I would deem to be »procedural«
programming /is/ supported by Java.

Procedural programming can be mapped onto object-oriented
programming, by using a single »default object« to interpret
all procedure calls and contain all »global variables« and
mapping procedure calls to messages to this default object. In
this sense, object-oriented programming contains procedural
programming.

Because Java also has »static« methods, mapping
procedures to methods is even simpler in Java.
 
R

Roedy Green

Is implementing a Java class a process of procedural programming?

the indivisibility methods are called procedures in other languages.

A static method that used only the parms and locals with no instance
variables would be procedural, as opposed to object-oriented.

See http://mindprod.com/jgloss/rules.html
for languages where you don't specify the algorithm, but rather the
desired end result, and the program searches for a solution on its
own. These are not procedural.

Abundance attempts to do as much of the coding as possible in the
variable declarations. If you managed to do 100% of it that way, say
by describing a GUI form, that would be not procedural.

A spreadsheet is not procedural. It has rules of the form, if other
cells change recompute this one via this formula, but it does not
specify exactly how the overall calculation happens.

Swing code where code gets triggered by events could be considered
non-procedural. Stuff just happen is a chaotic way, not one step
after the other like a recipe.
 
M

Mark Space

tenxian said:
Is implementing a Java class a process of procedural programming?

Short answer - no.

Java is squarely in the object oriented camp. You need a programmer
trained in object oriented programming, and object oriented design too.
A programmer trained in only procedural techniques will have a hard
time producing a quality Java program. Try to get someone with a SCJD
or at least SCJP, or lots of good experience with Java and object
oriented programming.


P.S. To c.l.j.p - this is the same guy who was advertising a great idea
for only 10,000 yaun just yesterday. I assume he's trying to read some
resumes right now.
 
Q

Qu0ll

Stefan Ram said:
There is no single globally accepted definition of »procedural
programming«. So you should give the terminology you refer to.

One might say that Java programming is procedural, because
Java methods could be interpreted to be »procedures«. We do
not have to push arguments onto the stack or load them into
registers and then jump to some subroutine anymore. But one
rarely does say this, because there rarely is need to point
this out.

Hey Stefan, I like the way you surround terms with a "<<" and ">>"
characters but I don't know how to add them in myself.

What key sequence and/or news reader do you need to do that?

--
And loving it,

-Q
_________________________________________________
(e-mail address removed)
(Replace the "SixFour" with numbers to email me)
 
R

RedGrittyBrick

Qu0ll said:
Hey Stefan, I like the way you surround terms with a "<<" and ">>"
characters but I don't know how to add them in myself.

See Windows Charmap for "Arial Unicode" or other Unicode font.
U+00AB Left-Pointing Double Angle Quotation Mark. Keystroke Alt+0171
U+00BB Right-Pointing Double Angle Quotation Mark. Keystroke ALt+0187
What key sequence and/or news reader do you need to do that?

I would use Alt+0171 to enter « but I suspect if you have a French
keyboard, you enter these characters directly.

Any newsreader that can work with a character set such as ISO-8859-1
Latin-1, Unicode or many many others. Surely this is supported by the
current versions of all actively maintained newsreaders?
 
R

RedGrittyBrick

Mark said:
Short answer - no.

Java is squarely in the object oriented camp. You need a programmer
trained in object oriented programming, and object oriented design too.
A programmer trained in only procedural techniques will have a hard
time producing a quality Java program. Try to get someone with a SCJD
or at least SCJP, or lots of good experience with Java and object
oriented programming.

I think if you perversely wanted to write procedural program in Java you
could do so. You'd have to avoid using most of the standard class
library so you'd probably have to waste a lot of time reinventing
procedural equivalents of a lot of OO library code.
P.S. To c.l.j.p - this is the same guy who was advertising a great idea
for only 10,000 yaun just yesterday. I assume he's trying to read some
resumes right now.

It was 10,0000 and it was yuan. :)
(Whatever happened to RenMinBi and FECs?)
 
M

Mark Space

RedGrittyBrick said:
Mark Space wrote:
I think if you perversely wanted to write procedural program in Java you
could do so. You'd have to avoid using most of the standard class
library so you'd probably have to waste a lot of time reinventing
procedural equivalents of a lot of OO library code.

See my previous statement about quality, emphasis on that word.

It was 10,0000 and it was yuan. :)

Oops, my bad.
(Whatever happened to RenMinBi and FECs?)

I prefer to be paid in Hostess Fruit Pies. ;)
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top