What is a language construct? (was Re: Comment on state of Project Jigsaw)

Peter Kriens peter.kriens at aqute.biz
Thu Jan 5 05:23:55 PST 2012


On 4 jan. 2012, at 17:02, Rémi Forax wrote:
> The .class format is already an extensible versioned container format
> with a dictionnary which is able to store string and class name.
> No shoehorn here.
Hmmmmm. To me this is the biggest shoehorn I've seen in a long, long time ... Would you ever, ever, use this format if it had not been there before? Is there any reason to use the class file except that it happens already be there? 

The worst thing is that you could view a class as a container of members, which on a higher level is also true for a module. However, the way the class format is used is ignoring this possibility and only (ab)uses the constant pool and the type's (!) attributes. Further:

a) It is not easy readable for inspection
c) You have to stopgap mandatory fields like super class, access, class name, etc.
d) It will confuse the heck out of any existing class parsers
e) It is not easy extendable for other module systems
f) There is just no need to use the class file
h) It unnecessarily complicates management systems

This is an almost perfect example of Conways law pointed out by Gafter. Once you're familiar with a technology you frame solutions in that technology.

Kind regards,

	Peter Kriens





> 
>>> This allow to have a readable syntax for the user and
>>> a module descriptor that contains synthetized informations
>>> by example the module descriptor can contain a set of exported types,
>>> having a .java let users to use a * (wildcard) to specify the exported
>>> types.
>> I don't follow why you would only get this feature if you describe the
>> module metadata in a .java file. You could just as easily define a
>> textual file format that allows the specification of wildcards...
>> 
>>> I expect all tools will use the jigsaw reflective API
>>> or ASM.
>> Well, ahem, requiring people to use ASM isn't really user-friendly IMHO...
> 
> Don't ask me if ASM use user friendly :)
>  http://asm.ow2.org/team.html
> 
>> 
>> David
> 
> Rémi
> 




More information about the jigsaw-dev mailing list