groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MG <mg...@arscreat.com>
Subject Re: Possible New Groovy Features... - Deduce the type of final fields from their assigned value
Date Sun, 27 Aug 2017 02:47:43 GMT


On 25.08.2017 10:09, Jochen Theodorou wrote:
> for me that is a feature likely to go. If you define a dynamic ctor, 
> it should return an object of at least the type that the ctor is for. 
> I do not care about subclasses or such, but I don't like Date result = 
> new Date() to fail.

I did not expect that, but I obviously agree.
Was going to reply to Paul something along the line that to me it seems 
a high price to pay just for avoiding the creation of an actual Mock 
object... (ignoring potential DSL use - but even here I would suggest, 
someone find another solution to whatever problem he is trying to solve, 
than to break the ctor contract...)

Markus



Mime
View raw message