Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #32951

Re: Teaching "purely object-oriented" Java

From Manuel Collado <m.collado@domain.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Teaching "purely object-oriented" Java
Date 2015-10-28 10:17 +0100
Organization Aioe.org NNTP Server
Message-ID <n0q3tc$2ln$1@speranza.aioe.org> (permalink)
References <Java-20151027231043@ram.dialup.fu-berlin.de>

Show all headers | View raw


El 27/10/2015 23:17, Stefan Ram escribió:
>    Some people complained that Java was not »purely
>    object-oriented« because one is forced to use non-static
>    methods.

This is a questionable argument. Classes are in fact higher-order 
objects. So, why shouldn't them have no methods?

Class methods are as pure OO feature as higher-order functions in pure 
functional programming.

> For example, in teaching Java, one has to write:
>
> public final class Main
> { public static void main( final java.lang.String[] args )
>    { java.lang.System.out.println( "Hello world!" ); }}
>
>    with a /static/ method.

Well, you can avoid it. But consider that the unavoidable 'new' operator 
is in fact a static method of the Object class.

Just an opinion.

-- 
Manuel Collado - http://lml.ls.fi.upm.es/~mcollado

Back to comp.lang.java.programmer | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Re: Teaching "purely object-oriented" Java Manuel Collado <m.collado@domain.invalid> - 2015-10-28 10:17 +0100
  Re: Teaching "purely object-oriented" Java Lew <lewbloch@gmail.com> - 2015-11-29 23:05 -0800
    Re: Teaching "purely object-oriented" Java Arne Vajhøj <arne@vajhoej.dk> - 2015-11-30 20:13 -0500
      Re: Teaching "purely object-oriented" Java Lew <lewbloch@gmail.com> - 2015-12-02 16:30 -0800

csiph-web