Incidentally, the presence of primitives is not the problematic part of the
bug that started this thread, but the useless behaviour of ==.

C# has primitives, but List<int> works, 5.ToString() works and if you do
happen to use Int32 instead of int, its == actually does the right thing
(compares the int, not the pointer).  You can still get at the Java-like
behaviour by casting both sides to object.

In case anyone thinks that this is because .NET has reified generics:

Scala doesn't really have primitives, but doesn't allocate a wrapper object
for Ints unless it really needs to, and in Scala List[Int] works,
5.toString works and if you do happen to use java.lang.Integer instead of
Int, its == actually does the right thing (compares the Int, not the
pointer).  I'm not sure how you get at the Java-like behaviour though,
never needed it.

On Mon, Mar 12, 2012 at 4:51 PM, Kevin Wright <[email protected]>wrote:

> Marketing helped (especially to schools/universities), as did garbage
> collection and low level concurrency primitives out of the box, faster
> compilation, saner error messages, and a rich standard library available
> for free (including AWT).
>
> But I don't believe that anybody every thought "ooh, primitives, I must
> use this language because it'll be so fast".  Not when it was (then)
> interpreted, and therefore slow for other reasons.  The only real benefit
> of primitives was an apparent passing familiarity to C++ devs.
>  On 12 March 2012 18:53, Josh Berry <[email protected]> wrote:
>
>> On Mon, Mar 12, 2012 at 2:08 PM, Cédric Beust ♔ <[email protected]> wrote:
>> > Also, I really don't buy for a second that marketing was important to
>> Java's
>> > success. The developer community and the growing infatuation for live
>> web
>> > pages at the time is what made Java cross the gap, not Sun's (fairly
>> feeble,
>> > for people who remember these days) marketing.
>>
>> I don't recall it being that feeble.  Seemed that Sun took great
>> efforts to get Java in many college intro courses.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "The Java Posse" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/javaposse?hl=en.
>>
>>
>
>
> --
> Kevin Wright
> mail: [email protected]
> gtalk / msn : [email protected]
> quora: http://www.quora.com/Kevin-Wright
> google+: http://gplus.to/thecoda
> <[email protected]>
> twitter: @thecoda
> vibe / skype: kev.lee.wright
> steam: kev_lee_wright
>
> "My point today is that, if we wish to count lines of code, we should not
> regard them as "lines produced" but as "lines spent": the current
> conventional wisdom is so foolish as to book that count on the wrong side
> of the ledger" ~ Dijkstra
>
>  --
> You received this message because you are subscribed to the Google Groups
> "The Java Posse" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/javaposse?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to