java.lang.constant.ClassDesc and TypeDescriptor for hidden class??

Peter Levart peter.levart at gmail.com
Tue Apr 14 09:28:52 UTC 2020



On 4/13/20 10:05 PM, forax at univ-mlv.fr wrote:
>
>     That's my summary why I went with option c'.    The preference is
>     "slightly".
>
>     Any other thought?
>
>
> I think c' is good for GetClassSignature where throwing an exception 
> is not something you can do, but for the Java side, 
> Class.descriptorString(), i prefer to follow the adage "the blow 
> early, blow often" because we can throw an exception as fast as we 
> detect an error.

But what if there was no error? I find conservative API helpful only as 
long as it doesn't prevent me from doing valid things or make me jump 
through hoops to achieve them.

> Consistency between C and Java is a great ideal but not at the price 
> of delaying the error reporting on the Java side.

You punish the programmer before (s)he even made an error on the 
assumption that (s)he probably would have made it.

This feels like "Minority Report".


Regards, Peter




More information about the valhalla-dev mailing list