f



Java Type System

Putting the following down on paper (OK, pixels) helped me to understand how 
generics extend the Java type system.  Since I haven't seen any texts that 
look at things in quite this fashion, I thought I'd post it on the chance 
that it would help others as well.  Note that this only discusses object 
types, not primitives, since it's describes the ability to refer to an 
object of type A by a reference of type B, with B a supertype of A.  It also 
doesn't discuss conversions of the sort found in

    float f  = 2;

or

    Integer i = 12;

In both cases, the entity on the right-hand side is converted to an entity 
of a different type, quite different from what happens in

    Object o = "hello";

in which the left hand-side is made to refer to precisely the entity that is 
the right-hand side.  OK, here we go:

The assignment statement in Java looks like

    reference = expression;

This is legal whenever the type R of the reference is a supertype of the 
type E of the expression, where "supertype" is defined so that, for all 
types T, T is a supertype of itself.  (As mentioned above, we're going to 
ignore primitives and built-in conversion.)  Before generics, the rules for 
supertype were relatively simple:

    1. T is a supertype of T
    2. If T is a class other then Object, T's superclass is a supertype of T
    3. Object is a supertype of all interfaces and array types
    4. All interfaces that T implements or extends are supertypes of T
    5. If T is a supertype of U:
          T[] is a supertype of U[] (i.e. arrays are covariant)
    6. If T is a supertype of U and U is a supertype of V, then T is a 
supertype if V (i.e. "supertype" is transitive)

There rules are all pretty clear, even if you don't ordinarily think of them 
that way.

Generics complicate this somewhat, by adding these extra rules.

  If T is a supertype of U, and A is a supertype of B:
    1. A<T> is a supertype of B<T>
    2. A<T> is not a supertype of A<U> (i.e. generics are not covariant)
    3. T is a supertype of <? extends T>
    4. There is no type V for which <? extends T> is a supertype of V
    5. <? super T> is a supertype of T
    6. The only supertype of <? super T> is Object
    7. A<? extends T> is a supertype of A<? extends U>
    8. A<? super U> is a supertype of A<? super T>



0
Mike
3/17/2010 7:07:59 PM
comp.lang.java.programmer 52658 articles. 0 followers. Post Follow

30 Replies
395 Views

Similar Articles

[PageSpeed] 51

On Wed, 17 Mar 2010 12:07:59 -0700, "Mike Schilling"
<mscottschilling@hotmail.com> wrote, quoted or indirectly quoted
someone who said :

>t also 
>doesn't discuss conversions of the sort found in
>
>    float f  = 2;
>
>or
>
>    Integer i = 12;
 
For the first look under "widening", for the second look under
"autoboxing".
-- 
Roedy Green Canadian Mind Products
http://mindprod.com

Responsible Development is the style of development I aspire to now. It can be summarized by answering the question, �How would I develop if it were my money?� I�m amazed how many theoretical arguments evaporate when faced with this question. 
~ Kent Beck (born: 1961 age: 49) , evangelist for extreme programming.
0
Roedy
3/17/2010 10:36:31 PM
Roedy Green wrote:
> On Wed, 17 Mar 2010 12:07:59 -0700, "Mike Schilling"
> <mscottschilling@hotmail.com> wrote, quoted or indirectly quoted
> someone who said :
>
>> t also
>> doesn't discuss conversions of the sort found in
>>
>>    float f  = 2;
>>
>> or
>>
>>    Integer i = 12;
>
> For the first look under "widening", for the second look under
> "autoboxing".



Yes, Roedy, I know what thty are, but they're not relevant to what I was 
exploring. 


0
Mike
3/17/2010 10:55:53 PM
On 17-03-2010 18:55, Mike Schilling wrote:
> Roedy Green wrote:
>> On Wed, 17 Mar 2010 12:07:59 -0700, "Mike Schilling"
>> <mscottschilling@hotmail.com>  wrote, quoted or indirectly quoted
>> someone who said :
>>> t also
>>> doesn't discuss conversions of the sort found in
>>>
>>>     float f  = 2;
>>>
>>> or
>>>
>>>     Integer i = 12;
>>
>> For the first look under "widening", for the second look under
>> "autoboxing".
>
> Yes, Roedy, I know what thty are, but they're not relevant to what I was
> exploring.

Most likely Roedy (as usual) did not read the entire message that he
was replying to.

Arne
0
ISO
3/18/2010 12:09:06 AM
Arne Vajh�j <arne@vajhoej.dk> writes:
>Most likely Roedy (as usual) did not read the entire message
>that he was replying to.

  Mike posted some very helpful observations at the end of
  his post. But he started his post with distracting and
  boring preliminaries. Possibly Roady was not the only one
  who was not reading it to the end. Anyway, I thank Mike
  for sharing his insights!

0
ram
3/18/2010 1:43:11 AM
Stefan Ram wrote:
> Arne Vajh�j <arne@vajhoej.dk> writes:
>> Most likely Roedy (as usual) did not read the entire message
>> that he was replying to.
>
>  Mike posted some very helpful observations at the end of
>  his post. But he started his post with distracting and
>  boring preliminaries. Possibly Roady was not the only one
>  who was not reading it to the end. Anyway, I thank Mike
>  for sharing his insights!

You're welcome.  (I think.) 


0
Mike
3/18/2010 1:44:49 AM
Mike Schilling wrote:
> Putting the following down on paper (OK, pixels) helped me to understand how 
> generics extend the Java type system.  ...

Nicely done.

Abstracting one layer, Mike has pinned an aspect of Java that particularly 
excites me, its type expression system.

"Type-oriented programming" is next-gen object-oriented programming.  Taken 
together, Java interfaces and generics form a declarative syntax of assertions 
about type relationships.

Properly used, this syntax lets the programmer direct the compiler to enforce 
assertions that lock a program into correct behavior.  Typifying the benefit, 
we eliminate runtime type checks (or crashes from lack of enforcement), e.g., 
that a collection contain only 'Person' instances.

In cases where we need a runtime type check to cooperate with compile-time 
enforcement, we coerce a 'Class<T>' variable into the mix, usually a private 
final member.  A little judicious reflection off that instance (I use the name 
'this.clazz') with conventions like that 'T' not need a complex constructor, 
and you can do anything you need for type 'T'.  The compiler infers type 
correctness from the 'Class' instance.

   public <T> T find( Class<T> clazz, Object key );

or

   public <T, K> T find( Class<T> clazz, K key );

which lets you call

   Person person = find( Person.class, name );

If the generic were applied to the type, you store the class in the instance 
rather than the argument list, e.g.,

   public class PersonManager extends Manager<Person, String>
   {
     public PersonManager()
     {
       super( Person.class ); // stores in Manager#clazz
     }
     @Override
     public Person find( String name )
     {
       return getEm().find( getClazz(), name );
     } // actually, this duplicates the superclass code
       // sorta - superclass is generic
   }

Superclass 'Manager<T, K>' left as an exercise.  I think of 'getEm()' and 
'getClazz()' as protected final methods.

-- 
Lew
0
Lew
3/18/2010 4:29:29 AM
On Wed, 17 Mar 2010 15:55:53 -0700, "Mike Schilling"
<mscottschilling@hotmail.com> wrote, quoted or indirectly quoted
someone who said :

>Yes, Roedy, I know what thty are, but they're not relevant to what I was 
>exploring. 
>

You were complaining that generic docs do not cover autoboxing and
widening. I was pointing out why there was no reason to expect them
to.
-- 
Roedy Green Canadian Mind Products
http://mindprod.com

Responsible Development is the style of development I aspire to now. It can be summarized by answering the question, �How would I develop if it were my money?� I�m amazed how many theoretical arguments evaporate when faced with this question. 
~ Kent Beck (born: 1961 age: 49) , evangelist for extreme programming.
0
Roedy
3/18/2010 7:55:46 AM
On 18 Mar 2010 01:43:11 GMT, ram@zedat.fu-berlin.de (Stefan Ram)
wrote, quoted or indirectly quoted someone who said :

>. Possibly Roady was not the only one
>  who was not reading it to the end

My comment still stands whether you read the whole post or not. 
-- 
Roedy Green Canadian Mind Products
http://mindprod.com

Responsible Development is the style of development I aspire to now. It can be summarized by answering the question, �How would I develop if it were my money?� I�m amazed how many theoretical arguments evaporate when faced with this question. 
~ Kent Beck (born: 1961 age: 49) , evangelist for extreme programming.
0
Roedy
3/18/2010 7:57:36 AM
According to Lew  <noone@lewscanon.com>:
> "Type-oriented programming" is next-gen object-oriented programming.
> Taken together, Java interfaces and generics form a declarative syntax
> of assertions about type relationships.
> 
> Properly used, this syntax lets the programmer direct the compiler to
> enforce assertions that lock a program into correct behavior.
> Typifying the benefit, we eliminate runtime type checks (or crashes
> from lack of enforcement), e.g., that a collection contain only
> 'Person' instances.

It may be noted that this is the road that C++ took, and it proved very
slippery. C++ tries to express assertions as types, and it mostly leads
to oversized and slow compilers, rather than the powrful compile-time
bug detection that was consistently promised but less consistently
achieved.

To some extent, Java was designed as an effort to do programming "not
like C++". In my view, "type-oriented programming" is not next-gen but
previous-gen, and generics are a step "back" (at least in time).
Generics were added because something had to be done about container
types (List, Map...) but in the grand view of programming languages
evolution, they represent a kind of failure.

I am not claiming that generics are ill-designed by themselves; hard and
smart work went into them, and they do what they were meant to do. I
claim that they are a revival of an old theme, and flow opposite to the
rest of the design of Java.


	--Thomas Pornin
0
Thomas
3/18/2010 11:36:43 AM
Thomas Pornin wrote:
> It may be noted that this is the road that C++ took, and it proved very
> slippery. C++ tries to express assertions as types, and it mostly leads
> to oversized and slow compilers, rather than the powrful compile-time
> bug detection that was consistently promised but less consistently
> achieved.

Java is rather the opposite - with generics, it expresses types as 
(compile-time) assertions.

I'm using "assertion" in the general sense here; this has nothing to do with 
the 'assert' keyword.

I do not see that generics has noticeably affected Java compiler size or 
speed, and it certainly has added powerful compile-time bug detection to Java.

-- 
Lew
0
Lew
3/18/2010 12:43:22 PM
According to Lew  <noone@lewscanon.com>:
> and it certainly has added powerful compile-time bug detection to Java.

I am not sure of that "bug" thing. Generics make life easier because
they avoids the need for a bunch of casts; they also are quite good at
documenting container types. But in practice it does not seem to detect
more bugs: the bugs it may detect are bugs that I was not doing in the
first place. It is _convenient_ that when I call a method which returns
a Collection<String> I know that the collection contains String
instances. But in pre-Java-5 code, I would have got a "Collection" and I
would have looked at the documentation to know what that Collection
contains. Generics may detect a bug only if, in that situation, I would
have boldly and wrongly assumed that the Collection contained something
else. This is not something which was actually happening at that time.

In brief, generics do not solve a bug-related problem that I had. They
do improve a documentation-related problem that I had -- namely with
code written by other people with poor documentation. They also make
code more readable due to the visual clutter implied by the extra casts.
Generics thus allow me to write code faster, because I waste less time
wading through external documentation and I can fit more useful code in
my eye-brain system. But bugs ? Nope.

Basically, after using Java and generics quite extensively, I simply do
not buy the marketing slogan "generics add powerful compile-time bug
detection". I also note that the same slogan has been used for C++ (with
regards to C) and I do not buy it either. In both situation it is a
"nice intent", the kind Hell is paved of.


	--Thomas Pornin
0
Thomas
3/18/2010 1:53:52 PM
Roedy Green wrote:
> On Wed, 17 Mar 2010 15:55:53 -0700, "Mike Schilling"
> <mscottschilling@hotmail.com> wrote, quoted or indirectly quoted
> someone who said :
>
>> Yes, Roedy, I know what thty are, but they're not relevant to what I
>> was exploring.
>>
>
> You were complaining that generic docs do not cover autoboxing and
> widening.

Where the hell did that come from? 


0
Mike
3/18/2010 3:32:51 PM
Thomas Pornin wrote:
> Basically, after using Java and generics quite extensively, I simply
> do not buy the marketing slogan "generics add powerful compile-time
> bug detection". I also note that the same slogan has been used for
> C++ (with regards to C) and I do not buy it either. In both situation
> it is a "nice intent", the kind Hell is paved of.

Function prototypes, invented in C++ and then retrofutted into C, prevent a 
large number of bugs caused by not getting the calling sequence of a 
function quite right. 


0
Mike
3/18/2010 3:35:29 PM
On 3/18/2010 11:32 AM, Mike Schilling wrote:
> Roedy Green wrote:
>> On Wed, 17 Mar 2010 15:55:53 -0700, "Mike Schilling"
>> <mscottschilling@hotmail.com>  wrote, quoted or indirectly quoted
>> someone who said :
>>
>>> Yes, Roedy, I know what thty are, but they're not relevant to what I
>>> was exploring.
>>>
>>
>> You were complaining that generic docs do not cover autoboxing and
>> widening.
>
> Where the hell did that come from?

     Don't feel bad that you don't see your complaints, Mike.
Neither can I.  Perhaps we have similar difficulties with
reading comprehension.

-- 
Eric Sosman
esosman@ieee-dot-org.invalid
0
Eric
3/18/2010 3:40:21 PM
On Thu, 18 Mar 2010 08:35:29 -0700, Mike Schilling wrote:

> Thomas Pornin wrote:
>> Basically, after using Java and generics quite extensively, I simply do
>> not buy the marketing slogan "generics add powerful compile-time bug
>> detection". I also note that the same slogan has been used for C++
>> (with regards to C) and I do not buy it either. In both situation it is
>> a "nice intent", the kind Hell is paved of.
>
                                           ^^  s/of/with/

....please. Like the UK nastiness,  "the england team", I find the 
Americanism of using 'of' instead of 'with' very irritating. Arrrr, I 
feel better with that off my chest.

> Function prototypes, invented in C++ and then retrofutted into C,
> prevent a large number of bugs caused by not getting the calling
> sequence of a function quite right.
>
So that's where it came from. I'd always assumed it was an ANSI C import 
from one of the Algols or Pascal. I still have a system with a K&R C 
compiler and really miss ANSI function prototypes every time I write 
something for it.


-- 
martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |
0
Martin
3/18/2010 6:01:47 PM
On Wed, 17 Mar 2010, Mike Schilling wrote:

> Stefan Ram wrote:
>> Arne Vajh?j <arne@vajhoej.dk> writes:
>>> Most likely Roedy (as usual) did not read the entire message
>>> that he was replying to.
>>
>>  Mike posted some very helpful observations at the end of
>>  his post. But he started his post with distracting and
>>  boring preliminaries. Possibly Roady was not the only one
>>  who was not reading it to the end. Anyway, I thank Mike
>>  for sharing his insights!
>
> You're welcome.  (I think.)

Yeah, too long for me, so didn't read it, but i'm looking forward to the 
movie. And only partly because i heard they cast Megan Fox as a bounded 
wildcard.

tom

-- 
I need a proper outlet for my tendency towards analytical thought. --
Geneva Melzack
0
Tom
3/18/2010 9:22:58 PM
On Thu, 18 Mar 2010, Thomas Pornin wrote:

> I am not claiming that generics are ill-designed by themselves; hard and
> smart work went into them, and they do what they were meant to do. I
> claim that they are a revival of an old theme, and flow opposite to the
> rest of the design of Java.

Interesting. Do you see Java falling into the gravity well of 
Smalltalk/Self, or something different?

tom

-- 
I need a proper outlet for my tendency towards analytical thought. --
Geneva Melzack
0
Tom
3/18/2010 9:24:35 PM
On Thu, 18 Mar 2010, Martin Gregorie wrote:

> On Thu, 18 Mar 2010 08:35:29 -0700, Mike Schilling wrote:
>
>> Thomas Pornin wrote:
>>> Basically, after using Java and generics quite extensively, I simply do
>>> not buy the marketing slogan "generics add powerful compile-time bug
>>> detection". I also note that the same slogan has been used for C++
>>> (with regards to C) and I do not buy it either. In both situation it is
>>> a "nice intent", the kind Hell is paved of.
>>
>                                           ^^  s/of/with/
>
> ...please. Like the UK nastiness,  "the england team", I find the
> Americanism of using 'of' instead of 'with' very irritating. Arrrr, I
> feel better with that off my chest.

I believe it is the road to hell that is so paved, rather than hell 
itself. Hell has parquet floors throughout.

tom

-- 
I need a proper outlet for my tendency towards analytical thought. --
Geneva Melzack
0
Tom
3/18/2010 9:26:58 PM
Thomas Pornin wrote:
>>> Basically, after using Java and generics quite extensively, I simply
>>> do not buy the marketing slogan "generics add powerful compile-time
>>> bug detection". I also note that the same slogan has been used for
>>> C++ (with regards to C) and I do not buy it either. In both situation
>>> it is a "nice intent", the kind Hell is paved of.
>

Martin Gregorie wrote:
>> ...please. Like the UK nastiness, =A0"the england team", I find the
>> Americanism of using 'of' instead of 'with' very irritating. Arrrr, I
>> feel better with that off my chest.
>

That's an Americanism?  I'm American, and I'm not familiar with it.

Tom Anderson wrote:
> I believe it is the road to hell that is so paved, rather than hell
> itself. Hell has parquet floors throughout.
>

If the road *to* Hell is paved with good intentions (not "intent"),
and one is traversing that road in the opposite direction, i.e., *away
from* Hell, is it not still paved with good intentions?

So the road out of Hell is paved with good intentions, yes?

The issue isn't the intentions, it's the direction in which one is
traveling atop them.

--
Lew

0
Lew
3/18/2010 10:05:47 PM
According to Lew  <lew@lewscanon.com>:
> That's an Americanism?  I'm American, and I'm not familiar with it.

I am not American, neither British, and English is not my mother
language, so my texts are subject to occasional (and creative) slipage.


	--Thomas Pornin
0
Thomas
3/18/2010 11:50:25 PM
On Thu, 18 Mar 2010 15:05:47 -0700, Lew wrote:

> Martin Gregorie wrote:
>>> ...please. Like the UK nastiness,  "the england team", I find the
>>> Americanism of using 'of' instead of 'with' very irritating. Arrrr, I
>>> feel better with that off my chest.
>>
>>
> That's an Americanism?  I'm American, and I'm not familiar with it.
>
I've always assumed it must be, since I've never seen it used by anybody 
other than an American. Its possible its written rather than spoken 
though I must admit that would surprise me.
 

-- 
martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |
0
Martin
3/18/2010 11:55:14 PM
On 18-03-2010 03:57, Roedy Green wrote:
> On 18 Mar 2010 01:43:11 GMT, ram@zedat.fu-berlin.de (Stefan Ram)
> wrote, quoted or indirectly quoted someone who said :
>> . Possibly Roady was not the only one
>>   who was not reading it to the end
>
> My comment still stands whether you read the whole post or not.

Still stand as being irrelevant for the thread.

Arne
0
ISO
3/19/2010 12:48:19 AM
On 18-03-2010 11:32, Mike Schilling wrote:
> Roedy Green wrote:
>> On Wed, 17 Mar 2010 15:55:53 -0700, "Mike Schilling"
>> <mscottschilling@hotmail.com>  wrote, quoted or indirectly quoted
>> someone who said :
>>> Yes, Roedy, I know what thty are, but they're not relevant to what I
>>> was exploring.
>>
>> You were complaining that generic docs do not cover autoboxing and
>> widening.
>
> Where the hell did that come from?

Out of thin air.

But hey it managed to squeeze 3 Java concepts into one
sentence.

That may actually impress some people. Especially
if they do not know Java.

Arne
0
ISO
3/19/2010 12:50:44 AM
On Thu, 18 Mar 2010 18:01:47 +0000 (UTC), Martin Gregorie
<martin@address-in-sig.invalid> wrote:

>On Thu, 18 Mar 2010 08:35:29 -0700, Mike Schilling wrote:
>
>> Thomas Pornin wrote:
>>> Basically, after using Java and generics quite extensively, I simply do
>>> not buy the marketing slogan "generics add powerful compile-time bug
>>> detection". I also note that the same slogan has been used for C++
>>> (with regards to C) and I do not buy it either. In both situation it is
>>> a "nice intent", the kind Hell is paved of.
>>
>                                           ^^  s/of/with/
>
>...please. Like the UK nastiness,  "the england team", I find the 
>Americanism of using 'of' instead of 'with' very irritating. 

Such misconstructions are not really "Americanisms" in the sense that
they are unique to the American dialect of English.  They are, rather,
something I like to call "stupidisms" (trademark pending) and, IMO,
are more indicative of poor language education rather than of locale
(though certainly locale and education may have correspondence).

YMMV.

My pet peeve is using "since" for "because".  I don't care what the
new dictionaries say ... those two words are not synonyms but merely
have partially coincident meaning.

YM I don't care to hear (unless you agree 8).

>Arrrr, I feel better with that off my chest.

Ditto.
0
George
3/19/2010 2:04:38 AM
On 18-03-2010 22:04, George Neuner wrote:
> On Thu, 18 Mar 2010 18:01:47 +0000 (UTC), Martin Gregorie
> <martin@address-in-sig.invalid>  wrote:
>
>> On Thu, 18 Mar 2010 08:35:29 -0700, Mike Schilling wrote:
>>
>>> Thomas Pornin wrote:
>>>> Basically, after using Java and generics quite extensively, I simply do
>>>> not buy the marketing slogan "generics add powerful compile-time bug
>>>> detection". I also note that the same slogan has been used for C++
>>>> (with regards to C) and I do not buy it either. In both situation it is
>>>> a "nice intent", the kind Hell is paved of.
>>>
>>                                            ^^  s/of/with/
>>
>> ...please. Like the UK nastiness,  "the england team", I find the
>> Americanism of using 'of' instead of 'with' very irritating.
>
> Such misconstructions are not really "Americanisms" in the sense that
> they are unique to the American dialect of English.  They are, rather,
> something I like to call "stupidisms" (trademark pending) and, IMO,
> are more indicative of poor language education rather than of locale
> (though certainly locale and education may have correspondence).
>
> YMMV.

Can you pronounce "R�dgr�d med fl�de" correctly?

Arne
0
ISO
3/19/2010 2:23:05 AM
George Neuner <gneuner2@comcast.net> writes:
>something I like to call "stupidisms" (trademark pending) and, IMO,

  Am I the only one to whom this subject sounds stupid:

      �First class developer: who ?�

  ? (I am not a native speaker of English, so I am not sure.)
  Let me quote:

      �Besides a mathematical inclination, an exceptionally
      good mastery of one's native tongue is the most vital
      asset of a competent programmer.� 

    attributed to Djikstra, but I can not confirm the source

      �If your writing is semi-literate, ungrammatical, and
      riddled with misspellings, many hackers (including myself)
      will tend to ignore you. While sloppy writing does not
      invariably mean sloppy thinking, we've generally found the
      correlation to be strong -- and we have no use for sloppy
      thinkers. If you can't yet write competently, learn to.�

    Eric Raymond
    
http://www.catb.org/~esr/faqs/hacker-howto.html#skills4

      �I've found that some of the best developers of all are
      English majors. They'll often graduate with no programming
      experience at all, and certainly without a clue about the
      difference between DRAM and EPROM.

      But they can write. That's the art of conveying
      information concisely and clearly. Software development
      and writing are both the art of knowing what you're going
      to do, and then lucidly expressing your ideas.�

http://praisecurseandrecurse.blogspot.com/2007/03/english-majors-as-programmers.html

0
ram
3/19/2010 2:25:13 AM
On Fri, 19 Mar 2010, Stefan Ram wrote:

> George Neuner <gneuner2@comcast.net> writes:
>> something I like to call "stupidisms" (trademark pending) and, IMO,
>
>  Am I the only one to whom this subject sounds stupid:
>
>      ?First class developer: who ??
>
>  ? (I am not a native speaker of English, so I am not sure.)
>  Let me quote:
>
>      ?Besides a mathematical inclination, an exceptionally
>      good mastery of one's native tongue is the most vital
>      asset of a competent programmer.?
>
>    attributed to Djikstra, but I can not confirm the source
>
>      ?If your writing is semi-literate, ungrammatical, and
>      riddled with misspellings, many hackers (including myself)
>      will tend to ignore you. While sloppy writing does not
>      invariably mean sloppy thinking, we've generally found the
>      correlation to be strong -- and we have no use for sloppy
>      thinkers. If you can't yet write competently, learn to.?
>
>    Eric Raymond
>
> http://www.catb.org/~esr/faqs/hacker-howto.html#skills4
>
>      ?I've found that some of the best developers of all are
>      English majors. They'll often graduate with no programming
>      experience at all, and certainly without a clue about the
>      difference between DRAM and EPROM.
>
>      But they can write. That's the art of conveying
>      information concisely and clearly. Software development
>      and writing are both the art of knowing what you're going
>      to do, and then lucidly expressing your ideas.?
>
> http://praisecurseandrecurse.blogspot.com/2007/03/english-majors-as-programmers.html

Nice quotes, Stefan! A sentiment i rather agree with - i think the skills 
of writing good natural language and good code are more similar than 
people think. Perhaps we should be setting George Orwell's essays and 
Jacques Prevert's poetry as reading in programming courses?

tom

-- 
Feeling down? Talk to someone you hate and replace that low feeling with
pure rage!! -- Rhys Davies
0
Tom
3/19/2010 11:00:37 AM
On Thu, 18 Mar 2010, Lew wrote:

> Thomas Pornin wrote:
>>>> Basically, after using Java and generics quite extensively, I simply
>>>> do not buy the marketing slogan "generics add powerful compile-time
>>>> bug detection". I also note that the same slogan has been used for
>>>> C++ (with regards to C) and I do not buy it either. In both situation
>>>> it is a "nice intent", the kind Hell is paved of.
>
> Tom Anderson wrote:
>> I believe it is the road to hell that is so paved, rather than hell
>> itself. Hell has parquet floors throughout.
>
> If the road *to* Hell is paved with good intentions (not "intent"), and 
> one is traversing that road in the opposite direction, i.e., *away from* 
> Hell, is it not still paved with good intentions?

Might not be. If it's a dual carriageway, or there's a one-way system, so 
the route back is not the same as the route there, then the paving could 
be different in either direction. And based on my experience of places on 
Earth similar to hell, i strongly suspect the one-way system.

Hmm. Are there any cases where roads have different pavings on lanes 
running in different directions? You could imagine a that a steeply 
sloping road in a wet or snowy country might - it could have a grippier 
surface on the lane running uphill.

tom

-- 
Where yesterday's future is here today
0
Tom
3/19/2010 11:14:20 AM
On 19/03/2010 11:14, Tom Anderson wrote:
> On Thu, 18 Mar 2010, Lew wrote:
>
>> Thomas Pornin wrote:
>>>>> Basically, after using Java and generics quite extensively, I simply
>>>>> do not buy the marketing slogan "generics add powerful compile-time
>>>>> bug detection". I also note that the same slogan has been used for
>>>>> C++ (with regards to C) and I do not buy it either. In both situation
>>>>> it is a "nice intent", the kind Hell is paved of.
>>
>> Tom Anderson wrote:
>>> I believe it is the road to hell that is so paved, rather than hell
>>> itself. Hell has parquet floors throughout.
>>
>> If the road *to* Hell is paved with good intentions (not "intent"),
>> and one is traversing that road in the opposite direction, i.e., *away
>> from* Hell, is it not still paved with good intentions?
>
> Might not be. If it's a dual carriageway, or there's a one-way system,
> so the route back is not the same as the route there, then the paving
> could be different in either direction. And based on my experience of
> places on Earth similar to hell, i strongly suspect the one-way system.
>
> Hmm. Are there any cases where roads have different pavings on lanes
> running in different directions? You could imagine a that a steeply
> sloping road in a wet or snowy country might - it could have a grippier
> surface on the lane running uphill.
>

It must therefore be Hell's demons that apply the Shellgrip™ on the 
approaches (i.e. one side of the road) to the Hangar Lane gyratory†?

-- 
RGB
† http://en.wikipedia.org/wiki/Hanger_Lane_gyratory
0
RedGrittyBrick
3/19/2010 11:28:17 AM
Tom Anderson wrote:
> Hmm. Are there any cases where roads have different pavings on lanes
> running in different directions? You could imagine a that a steeply
> sloping road in a wet or snowy country might - it could have a
> grippier surface on the lane running uphill.

When I was young, I used to walk five miles to school, uphill in both 
directions. 


0
Mike
3/19/2010 2:37:38 PM
Reply: