| Thread overview | |||||||||
|---|---|---|---|---|---|---|---|---|---|
|
July 14, 2014 File extension of c++ files used on d compiler sources | ||||
|---|---|---|---|---|
| ||||
Hello ! I'm starting to look at the d compiler sources and I'm using netbeans to navigate through the sources, netbeans is very good at showing warnings/errors with it's own internal parser, but because all the c++ source files use ".c" as file extension they are interpreted as "C" files and shows a lot of errors parsing then as "C" files. It could be a silly question but here it is: Why the c++ source files do not use file extensions that proper identifies then as c++ like ".cpp", ".C", ".cxx" ? This prevent/difficult some task automations by third party tools like I'm experimenting now with netbeans. It's fine that D is innovating in the programming language field but not all conventions are bad ones. Cheers ! | ||||
July 15, 2014 Re: File extension of c++ files used on d compiler sources | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Domingo Alvarez Duarte | On Monday, 14 July 2014 at 23:14:52 UTC, Domingo Alvarez Duarte wrote:
> It's fine that D is innovating in the programming language field but not all conventions are bad ones.
>
> Cheers !
Legacy, pretty sure the early C++ days used .c and Walters compiler comes from those early days.
I believe it hasn't change because of cost/benefit.
| |||
July 15, 2014 Re: File extension of c++ files used on d compiler sources | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Jesse Phillips | On Tue, Jul 15, 2014 at 02:16:36AM +0000, Jesse Phillips via Digitalmars-d wrote: > On Monday, 14 July 2014 at 23:14:52 UTC, Domingo Alvarez Duarte wrote: > >It's fine that D is innovating in the programming language field but not all conventions are bad ones. > > > >Cheers ! > > Legacy, pretty sure the early C++ days used .c and Walters compiler comes from those early days. > > I believe it hasn't change because of cost/benefit. Not being usable in an IDE is a pretty big cost IMO. (Even though I myself don't even use IDE's!) Maybe you might stand a chance of convincing Walter to do it. Probably after the upcoming release, since right now the focus is to get that out the door first. T -- The most powerful one-line C program: #include "/dev/tty" -- IOCCC | |||
July 15, 2014 Re: File extension of c++ files used on d compiler sources | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Domingo Alvarez Duarte | On 15/07/14 01:14, Domingo Alvarez Duarte wrote: > Hello ! > > I'm starting to look at the d compiler sources and I'm using netbeans to > navigate through the sources, netbeans is very good at showing > warnings/errors with it's own internal parser, but because all the c++ > source files use ".c" as file extension they are interpreted as "C" > files and shows a lot of errors parsing then as "C" files. Can't you manually specify the language of the files? I've done that in Xcode, it's only necessary to do once per file. -- /Jacob Carlborg | |||
July 15, 2014 Re: File extension of c++ files used on d compiler sources | ||||
|---|---|---|---|---|
| ||||
Posted in reply to H. S. Teoh | On 15/07/14 04:21, H. S. Teoh via Digitalmars-d wrote: > Not being usable in an IDE is a pretty big cost IMO. (Even though I > myself don't even use IDE's!) Maybe you might stand a chance of > convincing Walter to do it. Probably after the upcoming release, since > right now the focus is to get that out the door first. The front end will be translated to D anyway. Then it's only the backend. -- /Jacob Carlborg | |||
July 15, 2014 Re: File extension of c++ files used on d compiler sources | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Domingo Alvarez Duarte | On Monday, 14 July 2014 at 23:14:52 UTC, Domingo Alvarez Duarte wrote:
> Hello !
>
> I'm starting to look at the d compiler sources and I'm using netbeans to navigate through the sources, netbeans is very good at showing warnings/errors with it's own internal parser, but because all the c++ source files use ".c" as file extension they are interpreted as "C" files and shows a lot of errors parsing then as "C" files.
>
> It could be a silly question but here it is:
>
> Why the c++ source files do not use file extensions that proper identifies then as c++ like ".cpp", ".C", ".cxx" ?
>
> This prevent/difficult some task automations by third party tools like I'm experimenting now with netbeans.
>
> It's fine that D is innovating in the programming language field but not all conventions are bad ones.
>
> Cheers !
I've had problems with using third party tools on the dmd source as well.
Renaming files in git is non-destructive and easy.
| |||
July 15, 2014 Re: File extension of c++ files used on d compiler sources | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Jesse Phillips | On Tuesday, 15 July 2014 at 02:16:37 UTC, Jesse Phillips wrote:
> On Monday, 14 July 2014 at 23:14:52 UTC, Domingo Alvarez Duarte wrote:
>> It's fine that D is innovating in the programming language field but not all conventions are bad ones.
>>
>> Cheers !
>
> Legacy, pretty sure the early C++ days used .c and Walters compiler comes from those early days.
>
> I believe it hasn't change because of cost/benefit.
Yep, compilers even had flags to state how to interpret .c files.
--
Paulo
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply