October 22, 2008
Frank Benoit wrote:
> At the moment there are these mappings
> 
> org.eclipse.swt -> dwt
> org.eclipse     -> dwtx
> 
> Symbols:
> SWT             -> DWT
> SWTError        -> DWTError
> SWTException    -> DWTException
> ...
> 
> But there are more candidates for the dwt project.
> 
> com.novocode    -> ??
> com.ibm.icu     -> ??
> org.osgi        -> ??
> 
> Where to put them?
> And the rule for renaming should be consistent and open to new packages.
> But why do renaming anyway? Is it really that hard to type? Can IDEs and
> collective imports help?
> 
> What also is bad about the renaming, is that it must be done all over
> again. That is time consuming when preparing Java source.
> 
> So I think... What about changing all the renaming back to the original?
> Would that work? What do you think?
> 
> 

I vote for keeping the original names completely. A decent IDE will generate the needed imports for you anyway, so you don't have to type them.

O.
October 23, 2008
Frank Benoit wrote:
> At the moment there are these mappings
> 
> org.eclipse.swt -> dwt
> org.eclipse     -> dwtx
> 
> Symbols:
> SWT             -> DWT
> SWTError        -> DWTError
> SWTException    -> DWTException
> ...
> 
> But there are more candidates for the dwt project.
> 
> com.novocode    -> ??
> com.ibm.icu     -> ??
> org.osgi        -> ??
> 
> Where to put them?
> And the rule for renaming should be consistent and open to new packages.
> But why do renaming anyway? Is it really that hard to type? Can IDEs and
> collective imports help?
> 
> What also is bad about the renaming, is that it must be done all over
> again. That is time consuming when preparing Java source.
> 
> So I think... What about changing all the renaming back to the original?
> Would that work? What do you think?
> 
> 
Keep the original names for now, I suggest. Perhaps later some aliases could be put in place.

I am not really afraid of longish import names, in general you only have to type them once at the top of the file. Contrast this with c++ where you have to type a long story in the middle of your code.

On the other hand you may need to reward yourself for the hard work you have put in on the project and so rename away and make it more comfortable, but I don't know how that should map exactly. Perhaps consider 'specificity' and how much meaning each part of the name contributes. Where, persuambly dwt. could always start an import decleration.
October 24, 2008
Ary Borenszweig wrote:
> Frank Benoit wrote:
>> At the moment there are these mappings
>>
>> org.eclipse.swt -> dwt
>> org.eclipse     -> dwtx
>>
>> Symbols:
>> SWT             -> DWT
>> SWTError        -> DWTError
>> SWTException    -> DWTException
>> ...
>>
>> But there are more candidates for the dwt project.
>>
>> com.novocode    -> ??
>> com.ibm.icu     -> ??
>> org.osgi        -> ??
>>
>> Where to put them?
>> And the rule for renaming should be consistent and open to new packages.
>> But why do renaming anyway? Is it really that hard to type? Can IDEs and
>> collective imports help?
>>
>> What also is bad about the renaming, is that it must be done all over
>> again. That is time consuming when preparing Java source.
>>
>> So I think... What about changing all the renaming back to the original?
>> Would that work? What do you think?
> 
> I find that when porting stuff, renaming is not a good option. Take for instance Descent. It kept all the names of JDT unchanged, and that makes it very easy to add new code, make plugins work almost out of the box, etc.
> 
> When I started Descent, I thought about renaming stuff like IJavaProject to IDeeProject, or something similar, but I asked the PHPEclipse guys what did they do, since they also used JDT's code base. They replied to me saying that they renamed IJavaProject to IPhpProject, things like that, big mistake, and that they were having a bad time getting updates from newer JDT releases, and that I should not do the same as they did.
> 
> So my advice is to just keep the original names. Anyway, the S in SWT means Standard, so SWT for D is not bad. :-P

Yup, if the port/change was to be made only once, it would probably not be a problem, but if one wants to integrate the future updates and patches, it gets complicated.

Still, I think it still might be reasonable to maintain changes for the *package* names. They barely change, and are referenced probably only in import statements at the top of a file, so that should not make the task of merging new SWT updates significantly harder.

-- 
Bruno Medeiros - Software Developer, MSc. in CS/E graduate
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D
October 26, 2008
Hello Frank,

> John Reimer schrieb:
> 
>> Hello Frank,
>> 
>>> At the moment there are these mappings
>>> 
>>> org.eclipse.swt -> dwt
>>> org.eclipse     -> dwtx
>>> Symbols:
>>> SWT             -> DWT
>>> SWTError        -> DWTError
>>> SWTException    -> DWTException
>>> ...
>>> But there are more candidates for the dwt project.
>>> com.novocode    -> ??
>>> com.ibm.icu     -> ??
>>> org.osgi        -> ??
>>> Where to put them?
>>> And the rule for renaming should be consistent and open to new
>>> packages.
>>> But why do renaming anyway? Is it really that hard to type? Can IDEs
>>> and
>>> collective imports help?
>>> What also is bad about the renaming, is that it must be done all
>>> over
>>> again. That is time consuming when preparing Java source.
>>> So I think... What about changing all the renaming back to the
>>> original? Would that work? What do you think?
>>> 
>> DWT really is SWT throughout.  Even the coding style is almost
>> completely Java-like.  I think that the only reason it remains DWT is
>> because of the original porting precedent that chose the name. :)
>> 
>> It wouldn't bother me if DWT reverted back to the SWT name.  In fact,
>> that probably makes a lot of sense. I'm guessing that it might even
>> receive more recognition as a genuine SWT port from the SWT team and
>> others if it were to revert to that name.
>> 
>> BUT, I really really hope we don't adopt the long package names so
>> typical of the Java realm.  "org.eclipse.*" prepended to the dwt
>> namespace would be painful.  That's one Javaism that I hope stays
>> away from D.  But, if there are some REALLY good reasons that the
>> complete package names should be included, maybe I could be made to
>> agree.  I'm not very enthusiastic about Java in general, so anything
>> that reminds me too much of Java or causes me to forget that I'm
>> actually using D (which is supposed to improve the programmer's
>> life)... is not good.
>> 
>> That's my opinion, anyway. :)
>> 
>> -JJR
>> 
> I was really not asking for renaming the DWT project. I think the name
> is ok. DWT started as a SWT port but now, there is much more else.
> 

Oh!  I see now.  I really didn't get it.  I agree. Dwt /project/ name can stay as is. :)


> Changing the Symbol DWT back to SWT, well i never liked to rename it.
> It is the same reason i never wanted to rename jface to dface. The
> source is ported, but it is still SWT. And renaming is a bit like
> hiding the origin, which is not what i want.
> 


Yes, this should be okay to do, although I suppose if we change the package name back to swt, it might be slightly confusing if the project name is not the same.  But perhaps it doesn't really matter?  It seems that at least a few people here support the idea of keeping the project name as is, even if the package name changes back (which might be a good idea).


> About the package name.
> How would you map org.eclipse.osgi and org.osgi?
> How to map non-eclipse packages?


Good question.  At first, like I said, I felt slightly disagreeable about the idea of keeping long package names... but perhaps that's not critical in the long term because these packages /could/ easily be aliased differently if there existed enough demand for that.  

In the meantime, perhaps just adopt those /long/ package names and stick them in the addons directory.  I'm not sure if they should be added under dwtx or not.  For now, perhaps just leave them in the root project directory like so without mapping (excepting dwtx):

./dwtx
./org/eclipse/osgi
./com/novocode
./com/ibm/icu

Like I said, these could be aliased later if necessary to a short package name.  Perhaps consider to do the same with dwtx if this works out.

What do you think?

-JJR



1 2
Next ›   Last »