bool

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
17 messages Options
12
MG
Reply | Threaded
Open this post in threaded view
|

bool

MG
Hi,

since things are going so well with my "fin" = "final" proposal, I
propose that Groovy support "bool" as a shortcut for "boolean".

"boolean" is already seeing large scale use by Groovy developers, "bool"
instead of "boolean" saves nearly half of the keyword's characters,
"bool" is used in C++, it fits better with the also widely used "int",
and Groovy 3.0 is the ideal opportunity to introduce such language
extensions.

Cheers,
mg



Reply | Threaded
Open this post in threaded view
|

Re: bool

Jennifer Strater
Hi mg,

I also don't like the 'fin' proposal, but I could get behind 'bool'. It's shorter but doesn't lose the meaning. It also makes it easier for people coming from other programming languages.

Best,
Jenn
 

On Sun, Jul 22, 2018 at 11:39 PM, MG <[hidden email]> wrote:
Hi,

since things are going so well with my "fin" = "final" proposal, I propose that Groovy support "bool" as a shortcut for "boolean".

"boolean" is already seeing large scale use by Groovy developers, "bool" instead of "boolean" saves nearly half of the keyword's characters, "bool" is used in C++, it fits better with the also widely used "int", and Groovy 3.0 is the ideal opportunity to introduce such language extensions.

Cheers,
mg




Reply | Threaded
Open this post in threaded view
|

Re: bool

Suderman Keith-2
-1 on all proposals that introduce new keywords that do not have a strong justification and use case.  The only thing `fin` and `bool` will do is potentially conflict with existing variable/method names in programs with little other benefit.  One of my biggest pet peeve's with Python is how they have polluted the namespace with short names I typically use as variable names (dict, list, etc).  Let's not do this with Groovy.

Just my two cents.
Keith

On Jul 22, 2018, at 4:57 PM, Jennifer Strater <[hidden email]> wrote:

Hi mg,

I also don't like the 'fin' proposal, but I could get behind 'bool'. It's shorter but doesn't lose the meaning. It also makes it easier for people coming from other programming languages.

Best,
Jenn
 

On Sun, Jul 22, 2018 at 11:39 PM, MG <[hidden email]> wrote:
Hi,

since things are going so well with my "fin" = "final" proposal, I propose that Groovy support "bool" as a shortcut for "boolean".

"boolean" is already seeing large scale use by Groovy developers, "bool" instead of "boolean" saves nearly half of the keyword's characters, "bool" is used in C++, it fits better with the also widely used "int", and Groovy 3.0 is the ideal opportunity to introduce such language extensions.

Cheers,
mg





----------------------
Keith Suderman
Research Associate
Department of Computer Science
Vassar College, Poughkeepsie NY




MG
Reply | Threaded
Open this post in threaded view
|

Re: bool

MG
In reply to this post by Jennifer Strater
Hi Jenn,

@bool: You are right "bool" is of course used by many languages, including Python :-)

@meaning of "fin": I was thinking of the French word for "end".

Cheers,
mg


-------- Ursprüngliche Nachricht --------
Von: Jennifer Strater <[hidden email]>
Datum: 22.07.18 23:57 (GMT+01:00)
Betreff: Re: bool

Hi mg,

I also don't like the 'fin' proposal, but I could get behind 'bool'. It's shorter but doesn't lose the meaning. It also makes it easier for people coming from other programming languages.


On Sun, Jul 22, 2018 at 11:39 PM, MG <[hidden email]> wrote:
Hi,

since things are going so well with my "fin" = "final" proposal, I propose that Groovy support "bool" as a shortcut for "boolean".

"boolean" is already seeing large scale use by Groovy developers, "bool" instead of "boolean" saves nearly half of the keyword's characters, "bool" is used in C++, it fits better with the also widely used "int", and Groovy 3.0 is the ideal opportunity to introduce such language extensions.

Cheers,
mg




Reply | Threaded
Open this post in threaded view
|

Re: bool

Andres Almiray
In reply to this post by MG
-1 on supporting “bool”. Again, there’s little gain here and a lot of trouble down the road supporting an aliased type. 

Sent from my primitive Tricorder

On 23 Jul 2018, at 03:29, mg <[hidden email]> wrote:

Hi Jenn,

@bool: You are right "bool" is of course used by many languages, including Python :-)

@meaning of "fin": I was thinking of the French word for "end".

Cheers,
mg


-------- Ursprüngliche Nachricht --------
Von: Jennifer Strater <[hidden email]>
Datum: 22.07.18 23:57 (GMT+01:00)
Betreff: Re: bool

Hi mg,

I also don't like the 'fin' proposal, but I could get behind 'bool'. It's shorter but doesn't lose the meaning. It also makes it easier for people coming from other programming languages.

Best,
Jenn
 

On Sun, Jul 22, 2018 at 11:39 PM, MG <[hidden email]> wrote:
Hi,

since things are going so well with my "fin" = "final" proposal, I propose that Groovy support "bool" as a shortcut for "boolean".

"boolean" is already seeing large scale use by Groovy developers, "bool" instead of "boolean" saves nearly half of the keyword's characters, "bool" is used in C++, it fits better with the also widely used "int", and Groovy 3.0 is the ideal opportunity to introduce such language extensions.

Cheers,
mg




Reply | Threaded
Open this post in threaded view
|

Re: bool

Russel Winder-3
In reply to this post by MG
On Sun, 2018-07-22 at 23:39 +0200, MG wrote:

> Hi,
>
> since things are going so well with my "fin" = "final" proposal, I
> propose that Groovy support "bool" as a shortcut for "boolean".
>
> "boolean" is already seeing large scale use by Groovy developers,
> "bool"
> instead of "boolean" saves nearly half of the keyword's characters,
> "bool" is used in C++, it fits better with the also widely used
> "int",
> and Groovy 3.0 is the ideal opportunity to introduce such language
> extensions.
>
Isn't the long term intention to remove all primitive types from
languages compiling to the JVM?

Instead of int people are supposed to use Integer, instead of boolean
people are supposed to use Boolean, and leave all the optimisation to
the JVM.

Is there any point in fiddling with Groovy primitive type names in this
context?

--
Russel.
===========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk

signature.asc (849 bytes) Download Attachment
MG
Reply | Threaded
Open this post in threaded view
|

Re: bool

MG
I wanted to keep my mail concise, but also aliasing Bool = Boolean was more or less implied, for consistency & brevity reasons.

I would also think that Java would introduce Int = Integer, or use int = Integer in that case...

-------- Ursprüngliche Nachricht --------
Von: Russel Winder <[hidden email]>
Datum: 23.07.18 10:22 (GMT+01:00)
Betreff: Re: bool

On Sun, 2018-07-22 at 23:39 +0200, MG wrote:

> Hi,
>
> since things are going so well with my "fin" = "final" proposal, I
> propose that Groovy support "bool" as a shortcut for "boolean".
>
> "boolean" is already seeing large scale use by Groovy developers,
> "bool"
> instead of "boolean" saves nearly half of the keyword's characters,
> "bool" is used in C++, it fits better with the also widely used
> "int",
> and Groovy 3.0 is the ideal opportunity to introduce such language
> extensions.
>

Isn't the long term intention to remove all primitive types from
languages compiling to the JVM?

Instead of int people are supposed to use Integer, instead of boolean
people are supposed to use Boolean, and leave all the optimisation to
the JVM.

Is there any point in fiddling with Groovy primitive type names in this
context?

--
Russel.
===========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk
Reply | Threaded
Open this post in threaded view
|

Re: bool

Russel Winder-3
In reply to this post by MG
On Mon, 2018-07-23 at 12:40 +0200, mg wrote:
> I wanted to keep my mail concise, but also aliasing Bool = Boolean
> was more or less implied, for consistency & brevity reasons.
> I would also think that Java would introduce Int = Integer, or use
> int = Integer in that case...

When it comes to these sorts of discussion excessive brevity can leave
a lot of stuff missing!

Clearly Kotlin is going these routes to make Java types more like C++
types, but I am not convinced this is a good idea. Shrinking type
labels just to save a few keystrokes, or to conform to a 1970s view of
type names, doesn't strike me as a good rationale. If however you could
point to some psychology of programming experiments that proved code
using bool rather than boolean and/or Bool rather than Boolean
increased speed of code reading and comprehension, then you get my
wholehearted backing for the change.

--
Russel.
===========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk

signature.asc (849 bytes) Download Attachment
MG
Reply | Threaded
Open this post in threaded view
|

Re: bool

MG
A quick search did not turn up anything on Kotlin using bool instead of boolean. Do you have a link ?

To me brevity - as long as readability/code comprehension does not suffer - is always a desirable feature.
Otherwise Groovy's each would be forEach or forEachElement or maybe even applyClosureToEachElementInDefaultOrder.
Other examples are println which should be printLine or printInNewLine.

"bool" in C++ at least seems to be from slightly before 2000, btw. It seems the unwieldy "boolean" is actually the older term. And not a well choosen one at that, since due to allowed values of [true, false, null] in Java/Groovy the resulting algebra is actually not Boolean (https://en.wikipedia.org/wiki/Boolean_algebra) :-)



-------- Ursprüngliche Nachricht --------
Von: Russel Winder <[hidden email]>
Datum: 23.07.18 13:04 (GMT+01:00)
Betreff: Re: bool

On Mon, 2018-07-23 at 12:40 +0200, mg wrote:
> I wanted to keep my mail concise, but also aliasing Bool = Boolean
> was more or less implied, for consistency & brevity reasons.
> I would also think that Java would introduce Int = Integer, or use
> int = Integer in that case...

When it comes to these sorts of discussion excessive brevity can leave
a lot of stuff missing!

Clearly Kotlin is going these routes to make Java types more like C++
types, but I am not convinced this is a good idea. Shrinking type
labels just to save a few keystrokes, or to conform to a 1970s view of
type names, doesn't strike me as a good rationale. If however you could
point to some psychology of programming experiments that proved code
using bool rather than boolean and/or Bool rather than Boolean
increased speed of code reading and comprehension, then you get my
wholehearted backing for the change.

--
Russel.
===========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk
Reply | Threaded
Open this post in threaded view
|

Re: bool

Suderman Keith-2
In reply to this post by Jennifer Strater
Sending this again because my mail program keeps insisting on changing the From: address... apologies if this gets double posted.

-1 on all proposals that introduce new reserved words that do not have a strong justification and use case.  The only thing `fin` and `bool` will do is potentially conflict with existing variable/method names in programs with little other benefit.  One of my biggest pet peeve's with Python is how they have polluted the namespace with short names I like to use as variable names (dict, list, etc).  Let's not do this with Groovy.

Just my two cents.
Keith

On Jul 22, 2018, at 4:57 PM, Jennifer Strater <[hidden email]> wrote:

Hi mg,

I also don't like the 'fin' proposal, but I could get behind 'bool'. It's shorter but doesn't lose the meaning. It also makes it easier for people coming from other programming languages.

Best,
Jenn
 

On Sun, Jul 22, 2018 at 11:39 PM, MG <[hidden email]> wrote:
Hi,

since things are going so well with my "fin" = "final" proposal, I propose that Groovy support "bool" as a shortcut for "boolean".

"boolean" is already seeing large scale use by Groovy developers, "bool" instead of "boolean" saves nearly half of the keyword's characters, "bool" is used in C++, it fits better with the also widely used "int", and Groovy 3.0 is the ideal opportunity to introduce such language extensions.

Cheers,
mg





----------------------
Keith Suderman
Research Associate
Department of Computer Science
Vassar College, Poughkeepsie NY






----------------------
Keith Suderman
Research Associate
Department of Computer Science
Vassar College, Poughkeepsie NY




12