Re: Precise types & retyping
| Newsgroups | gmane.comp.lang.nice.general |
|---|---|
| Message-ID | <[email protected]> |
Quoting Daniel Bonniot <[email protected]>: > import org.eclipse.swt.* (!); > > The (...) represent method arguments, and ! non-null types, both being > consistent with Nice's syntax. So this says that for package > org.eclipse.swt, method arguments are by default taken to be non-null. > Results are also non-null as usual. If I have two packages: Package A: import org.eclpise.swt.* (!); Package B: import org.eclipse.swt.*; Now, everything in org.eclipse.swt has two types? That doesn't make sense. I suggest that you move this package-level retyping to the package declaration: org/eclise/swt/typing.nice: package org.eclise.swt (!); // retypings/renamings of specific methods/constructors/etc follow I think it only makes sense to keep retypings in a centralized place. In fact, you could pull retypings out of the grammar for Nice files and require that retypings be in seperate *.typing files that only allow retypings. I don't think that retyping declarations should be part of the language definition, since it doesn't make sense to retype a Nice method; it only makes sense to retype a non-Nice method. - Brian ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click