Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 331466 - Please stop using single letter template parameters by default when generating templates
Summary: Please stop using single letter template parameters by default when generatin...
Status: CLOSED FIXED
Alias: None
Product: Acceleo
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-30 14:19 EST by Glenview Jeff CLA
Modified: 2011-02-07 09:33 EST (History)
1 user (show)

See Also:


Attachments
tentative patch (17.59 KB, patch)
2011-01-25 05:30 EST, Laurent Goubet CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Glenview Jeff CLA 2010-11-30 14:19:02 EST
Build Identifier: M20100211-1343

Please stop using single letter template parameters by default when generating templates, especially using the letter i.  When you generate a template from a file, the template that gets created by default uses the first letter of the name of the parameter type.  

This is bad practice in general to name a variable with a single letter.  How about aTypeName/anTypeName instead?

Specifically, I'd even consider it a bug that the letter i is used, given that it becomes inaccessible inside a loop.

Please consider this as a companion request to obsolete the i syntax altogether and come up with a special name for the iterator that is not normally a valid variable name such as [i$/]

Thanks!


Reproducible: Always

Steps to Reproduce:
See above.
Comment 1 Laurent Goubet CLA 2011-01-25 05:30:53 EST
Created attachment 187506 [details]
tentative patch

This patch changes all of the completion proposals containing "variable" names to longer, better describing names.
Comment 2 Laurent Goubet CLA 2011-02-07 09:33:50 EST
Patch commited on both 3.0 maintenance and HEAD. Will be available in 3.0.2RC3 and 3.1.0M6