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


Groups > comp.lang.java.programmer > #31088 > unrolled thread

Re: "null", polymorphism and TCO

Started byEric Sosman <esosman@comcast-dot-net.invalid>
First post2015-02-08 15:03 -0500
Last post2015-02-08 15:03 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.java.programmer

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: "null", polymorphism and TCO Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-02-08 15:03 -0500

#31088 — Re: "null", polymorphism and TCO

FromEric Sosman <esosman@comcast-dot-net.invalid>
Date2015-02-08 15:03 -0500
SubjectRe: "null", polymorphism and TCO
Message-ID<mb8fe8$a88$1@dont-email.me>
On 2/8/2015 1:16 PM, Stefan Ram wrote:
>    A book said that one needed null to mark the end of a linked
>    list:
> [...]
>    Neither null nor java.util.Optional is needed when one
>    is using polymorphism, i.e., real OOP. We just need to say
>    that an entry with a next entry is a different type than
>    an entry without a next entry. No »null«, no »Optional«,
>    just polymorphism!
> [...]

     When I was a young lad and learning my first programming
language (FORTRAN II; "young" was long ago for me), I figured
out how to write a counted loop using a "computed GOTO" instead
of a "DO".  Thus I proved my own great cleverness.

     ISTM your idea is similarly clever -- and similarly useless.

-- 
esosman@comcast-dot-net.invalid
"Don't be afraid of work. Make work afraid of you." -- TLM

[toc] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web