You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@groovy.apache.org by Keegan Witt <ke...@gmail.com> on 2015/08/20 15:34:33 UTC
Documenting primitive autoboxing
So I didn't see anywhere that we documented that Groovy autoboxes primitive
types, like this
byte by
short s
int i
long l
float f
double d
char c
boolean bo
assert by.class != byte.class && by.class == Byte.class
assert s.class != short.class && s.class == Short.class
assert i.class != int.class && i.class == Integer.class
assert l.class != long.class && l.class == Long.class
assert f.class != float.class && f.class == Float.class
assert d.class != double.class && d.class == Double.class
assert c.class != char.class && c.class == Character.class
assert bo.class != boolean.class && bo.class == Boolean.class
If I've missed where we documented this, please point it out to me. If I'm
right about it not being documented, where should it be added? I was
thinking maybe in the"Primitive types" section in 1.4 of
core-object-orientation.adoc and maybe a new section in
core-differences-java.adoc as well. What do you think?
-Keegan
Re: Documenting primitive autoboxing
Posted by Keegan Witt <ke...@gmail.com>.
Yeah, I missed that in my initial PR. I fixed it yesterday. Thanks for
looking it over!
-Keegan
On Fri, Aug 21, 2015 at 10:03 AM, Suderman Keith <su...@cs.vassar.edu>
wrote:
> Hi Keegan,
>
> I only gave the docs a quick look but I noticed a small typo on line 265
> of src/spec/doc/core-differences-java.adoc
>
> "+Because uses Objects for everything, ..."
>
> I susect this is supposed to read:
> "Because Groovy uses Objects for everything..."
>
> or something similar.
>
> Cheers,
> Keith
>
> On Aug 20, 2015, at 11:56 PM, Keegan Witt <ke...@gmail.com> wrote:
>
> I started this. Let me know if you have any suggesitons:
> https://github.com/apache/incubator-groovy/pull/94
>
> -Keegan
>
> On Thu, Aug 20, 2015 at 1:23 PM, Jochen Theodorou <bl...@gmx.org>
> wrote:
>
>> Am 20.08.2015 15:34, schrieb Keegan Witt:
>> [...]
>>
>>> If I've missed where we documented this, please point it out to me. If
>>> I'm right about it not being documented, where should it be added? I
>>> was thinking maybe in the"Primitive types" section in 1.4 of
>>> core-object-orientation.adoc and maybe a new section in
>>> core-differences-java.adoc as well. What do you think?
>>>
>>
>> sure, fell free to add something
>>
>> bye blackdrag
>>
>> --
>> Jochen "blackdrag" Theodorou
>> blog: http://blackdragsview.blogspot.com/
>>
>>
>
>
Re: Documenting primitive autoboxing
Posted by Suderman Keith <su...@cs.vassar.edu>.
Hi Keegan,
I only gave the docs a quick look but I noticed a small typo on line 265 of src/spec/doc/core-differences-java.adoc
"+Because uses Objects for everything, ..."
I susect this is supposed to read:
"Because Groovy uses Objects for everything..."
or something similar.
Cheers,
Keith
On Aug 20, 2015, at 11:56 PM, Keegan Witt <ke...@gmail.com> wrote:
> I started this. Let me know if you have any suggesitons: https://github.com/apache/incubator-groovy/pull/94
>
> -Keegan
>
> On Thu, Aug 20, 2015 at 1:23 PM, Jochen Theodorou <bl...@gmx.org> wrote:
> Am 20.08.2015 15:34, schrieb Keegan Witt:
> [...]
> If I've missed where we documented this, please point it out to me. If
> I'm right about it not being documented, where should it be added? I
> was thinking maybe in the"Primitive types" section in 1.4 of
> core-object-orientation.adoc and maybe a new section in
> core-differences-java.adoc as well. What do you think?
>
> sure, fell free to add something
>
> bye blackdrag
>
> --
> Jochen "blackdrag" Theodorou
> blog: http://blackdragsview.blogspot.com/
>
>
Re: Documenting primitive autoboxing
Posted by Keegan Witt <ke...@gmail.com>.
I started this. Let me know if you have any suggesitons:
https://github.com/apache/incubator-groovy/pull/94
-Keegan
On Thu, Aug 20, 2015 at 1:23 PM, Jochen Theodorou <bl...@gmx.org> wrote:
> Am 20.08.2015 15:34, schrieb Keegan Witt:
> [...]
>
>> If I've missed where we documented this, please point it out to me. If
>> I'm right about it not being documented, where should it be added? I
>> was thinking maybe in the"Primitive types" section in 1.4 of
>> core-object-orientation.adoc and maybe a new section in
>> core-differences-java.adoc as well. What do you think?
>>
>
> sure, fell free to add something
>
> bye blackdrag
>
> --
> Jochen "blackdrag" Theodorou
> blog: http://blackdragsview.blogspot.com/
>
>
Re: Documenting primitive autoboxing
Posted by Jochen Theodorou <bl...@gmx.org>.
Am 20.08.2015 15:34, schrieb Keegan Witt:
[...]
> If I've missed where we documented this, please point it out to me. If
> I'm right about it not being documented, where should it be added? I
> was thinking maybe in the"Primitive types" section in 1.4 of
> core-object-orientation.adoc and maybe a new section in
> core-differences-java.adoc as well. What do you think?
sure, fell free to add something
bye blackdrag
--
Jochen "blackdrag" Theodorou
blog: http://blackdragsview.blogspot.com/