Re: About simplifying the switch for runtime groovydoc

2018-11-02 Thread MG
Agree with Guillaume here: In my (bad) experience, 15 Facebook friends is all it takes to swing nearly any poll in your favour and get a landslide victory. Am 24.10.2018 um 16:12 schrieb Guillaume Laforge: Not necessarily. Discussions are better, leading towards a consensus. Polls can have ver

Re: About simplifying the switch for runtime groovydoc

2018-10-28 Thread Daniel.Sun
Hi Remko, You can get the runtime groovydoc with reflection, here is an example: AA.class.getMethod('m', new Class[0]).groovydoc.content.contains('method m') BTW, I think we can add a DGM to simplify the above code ;-) The complete example van be found at: https://github.com/apache/groovy/blob/

Re: About simplifying the switch for runtime groovydoc

2018-10-28 Thread Remko Popma
Daniel, Question: how do I consume the groovydoc string at runtime in the application? For example, I would like to do something like this: —— /**@ * Encrypts a file. */ class Encrypt { static void main(String... args) { def cli = new CliBuilder() def descr = // how to get

Re: About simplifying the switch for runtime groovydoc

2018-10-28 Thread Daniel.Sun
Hi Guillaume, > it's still possible to change the syntax at this time without any harm. Here is the PR to complete the change: https://github.com/apache/groovy/pull/817 Cheers, Daniel.Sun - Daniel Sun Apache Groovy committer Blog: http://blog.sunlan.me Twitter: @daniel_sun -- Sent

Re: About simplifying the switch for runtime groovydoc

2018-10-28 Thread Guillaume Laforge
Since it's for Groovy 3.0, and @GroovyDoc hasn't yet been available in an officially released version, it's still possible to change the syntax at this time without any harm. On Sun, Oct 28, 2018 at 7:40 AM Remko Popma wrote: > > > > On Oct 25, 2018, at 21:48, Keith Suderman wrote: > > > > On

Re: About simplifying the switch for runtime groovydoc

2018-10-27 Thread Remko Popma
> On Oct 25, 2018, at 21:48, Keith Suderman wrote: > > > >> On Oct 24, 2018, at 8:31 PM, Remko Popma wrote: >> >> In addition, there is nothing about the long @GroovyDoc notation that tells >> me the doc string is retained at runtime. So it isn’t actually clearer... > > This. When I fir

Re: About simplifying the switch for runtime groovydoc

2018-10-25 Thread Keith Suderman
> On Oct 24, 2018, at 8:31 PM, Remko Popma wrote: > > In addition, there is nothing about the long @GroovyDoc notation that tells > me the doc string is retained at runtime. So it isn’t actually clearer... This. When I first saw @GroovyDoc my initial reaction was, "Of course it is GroovyDoc

Re: About simplifying the switch for runtime groovydoc

2018-10-24 Thread Remko Popma
I like the short notation much better than the long notation. The /** notation for Javadoc was cryptic 20 years ago but there was no resistance to the idea. Why not? Because it was such a useful feature of the language! I think we all agree that making GroovyDoc available at runtime is a use

Re: About simplifying the switch for runtime groovydoc

2018-10-24 Thread Guillaume Laforge
Not necessarily. Discussions are better, leading towards a consensus. Polls can have very different outcomes depending on how you define the questions and answers, how you advertise the poll, how you interpret the results of the poll, etc. Before any poll, I'd like to hear about those early users o

Re: About simplifying the switch for runtime groovydoc

2018-10-24 Thread Daniel.Sun
Raising a poll may be better way to make decisions ;) Cheers, Daniel.Sun - Daniel Sun Apache Groovy committer Blog: http://blog.sunlan.me Twitter: @daniel_sun -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html

Re: About simplifying the switch for runtime groovydoc

2018-10-22 Thread MG
Hi Guillaume, thank you fro your reply. All that you are saying is evident to me since when I perceived Groovy for the first time. It is one of the reasons I'm so high on Groovy, and not e.g. on Kotlin (which to me has bad syntax decisions wherever it deviates from Groovy) or Scala, etc: Groov

Re: About simplifying the switch for runtime groovydoc

2018-10-22 Thread Guillaume Laforge
Groovy always tried to strike a fine balance between conciseness and readability. If you look even at our operators, they try to convey some meaning, like ?. is like let's try to get that field/method with the question mark, or ?: being a contraction of the ternary operator. But to avoid making cod

Re: About simplifying the switch for runtime groovydoc

2018-10-21 Thread Remko Popma
MG’s arguments make sense to me. Remko > On Oct 21, 2018, at 23:05, MG wrote: > > Yea, sure. But doesn't a new shorthand syntax always have that trait ?-) > And would that not mean that we can never, ever again introduce a shorthand > notation in Groovy for anything, unless it is syntacticall

Re: About simplifying the switch for runtime groovydoc

2018-10-21 Thread Jochen Theodorou
On 21.10.2018 00:42, Paul King wrote: I am not against a shortened form but I'd wait and see how usage of @Groovydoc goes first. If it's use is extremely popular it would make sense to consider shortcuts. agreed... on a side topic... do we have to do something with Groovydoc for later java ve

Re: About simplifying the switch for runtime groovydoc

2018-10-21 Thread MG
Here is the problem I see with this approach (which I have seen multiple times now since I joined the ML): 1. The (oftentimes imho plausible) argument for introducing something new in Groovy is, that current support is too cumbersome (as with Daniel's proposal). 2. The suggestion then is,

Re: About simplifying the switch for runtime groovydoc

2018-10-21 Thread MG
Yea, sure. But doesn't a new shorthand syntax always have that trait ?-) And would that not mean that we can never, ever again introduce a shorthand notation in Groovy for anything, unless it is syntactically based on an existing/established shorthand notation (which in this case it kinda is, s

Re: About simplifying the switch for runtime groovydoc

2018-10-21 Thread Guillaume Laforge
Well, /** has been in use for more than 20 years, so we've had time to get used to it. /**@ is totally non-obvious. I've no idea what it would have been about without having read this thread. On Sun, Oct 21, 2018 at 4:28 AM MG wrote: > I agree with Daniel, I think > /**@ > would be neither more

Re: About simplifying the switch for runtime groovydoc

2018-10-20 Thread MG
I agree with Daniel, I think /**@ would be neither more nor less cryptic than /** which everyone is just used to from Java (and which seems to have no memnonic / self-explanatory characteristics to me...). Cheers, mg On 21.10.2018 03:04, Daniel.Sun wrote: Hi Guillaume, Javadoc switc

Re: About simplifying the switch for runtime groovydoc

2018-10-20 Thread Daniel.Sun
Hi Guillaume, Javadoc switch `/**` is cryptic too at the beginning, but now I believe few people like the following form ;-) /* * @Javadoc * some Javadoc here */ Cheers, Daniel.Sun - Daniel Sun Apache Groovy committer Blog: http://blog.sunlan.me Twitter: @daniel_sun --

Re: About simplifying the switch for runtime groovydoc

2018-10-20 Thread Paul King
I am not against a shortened form but I'd wait and see how usage of @Groovydoc goes first. If it's use is extremely popular it would make sense to consider shortcuts. On Sun, Oct 21, 2018 at 4:22 AM Guillaume Laforge wrote: > I find that a bit too cryptic. > I prefer it to be more explicit, even

Re: About simplifying the switch for runtime groovydoc

2018-10-20 Thread Paolo Di Tommaso
Same here. p On Sat, Oct 20, 2018 at 8:22 PM Guillaume Laforge wrote: > I find that a bit too cryptic. > I prefer it to be more explicit, even if a bit more verbose. > > On Sat, Oct 20, 2018 at 3:28 PM Daniel.Sun wrote: > >> Hi all, >> >> Current switch for runtime groovydoc is a bit v

Re: About simplifying the switch for runtime groovydoc

2018-10-20 Thread Guillaume Laforge
I find that a bit too cryptic. I prefer it to be more explicit, even if a bit more verbose. On Sat, Oct 20, 2018 at 3:28 PM Daniel.Sun wrote: > Hi all, > > Current switch for runtime groovydoc is a bit verbose, i.e. > `@Groovydoc` is a bit long. For example, > ``` > /** > *@Groovyd