www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4008] New: dmd source should contain no tabs and use .cpp file extensions

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4008

           Summary: dmd source should contain no tabs and use .cpp file
                    extensions
           Product: D
           Version: future
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: nfxjfg gmail.com


--- Comment #0 from nfxjfg gmail.com 2010-03-26 03:22:47 PDT ---
Rationale:

Right now, the dmd source code contains mixed tabs and spaces for indentation.
You can have endless discussions about whether using tabs for indentation is
ok, but I'm sure almost everybody will agree that MIXING tabs and spaces is a
really, really, really bad idea and causes trouble for most editors, making
writing or applying patches unnecessarily hard. I suggest Walter to
consistently use either tabs or spaces for indentation (spaces would cause the
least trouble for others).

Additionally, the dmd source is full of .c whiles, which, despite their file
extensions, are not C, but C++ sources. This is confusing and leads to trouble
with various tools trying to autodetect the language from the filename. I
suggest using more conventional file extensions. I believe .cpp is most widely
accepted for C++ sources.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 26 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4008


bearophile_hugs eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs eml.cc


--- Comment #1 from bearophile_hugs eml.cc 2010-03-26 07:44:34 PDT ---
They are both ideas that I like, but:
- It seems versioning systems are stupid, they are not able to ignore leading
spaces, so replacing tabs with spaces can create a huge diff file, essentially
it's a new version of all files. Yet, if this is the only change then I think
this can be acceptable.
- Walter and others seems to not like "cpp" file extensions.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 26 2010
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4008



--- Comment #2 from nfxjfg gmail.com 2010-03-26 07:51:58 PDT ---
Other popular file extensions:  .cc .cxx .c++

I've never seen .c for C++ sources, only dmd.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 26 2010
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4008



--- Comment #3 from nfxjfg gmail.com 2010-03-30 20:09:53 PDT ---
http://dsource.org/projects/dmd/changeset/428
"remove tabs, any trailing spaces"

Thanks, Walter! This is a good change. The dmd source code's indentation will
no longer look chaotically random for new people.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 30 2010
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4008


nfxjfg gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 06 2011