Uphill
Atila Neves via Digitalmars-d
digitalmars-d at puremagic.com
Sun May 31 01:50:59 PDT 2015
While C++ programmers should try and avoid the preprocessor as
much as possible, sometimes it just isn't possible to do so.
There's just no other way to generate code sometimes. I know,
I've tried.
Atila
On Sunday, 31 May 2015 at 07:54:29 UTC, Paulo Pinto wrote:
> On Sunday, 31 May 2015 at 06:03:36 UTC, Brian Schott wrote:
>> On Sunday, 31 May 2015 at 04:18:32 UTC, Walter Bright wrote:
>>>> Furthermore, the adoption of this
>>>> feature would seriously compromise our ability to produce
>>>> AST- based tools
>>>> for C++, and therefore put C++ at a further disadvantage
>>>> compared to other
>>>> modern languages vis a vis tool support.
>>
>> I find it hilarious that they can say that in a language that
>> needs a preprocessor. Macros (and mixins) destroy AST-based
>> tools, not things like "static if" that are right there in the
>> AST.
>
> Using macros in C++ is considered bad style and a sign of
> someone sticking to Cisms.
>
> With meta-programming, templates, strong enums, const,
> constexpr and inline there are very few valid reasons to use
> macros other than C copy-paste compatibility.
>
> However, C++ seems to be really into the route of library only
> language if we look at how it is available on mobile OS, only
> as complement to the main languages, not as the language under
> the spotlight.
>
> Even on WinRT, C++/CX doesn't seem to get many followers
> outside the game developers world. To the point that Windows 10
> will also expose DirectX as WinRT components (on 8.x it is only
> directly available to C++).
>
>
> --
> Paulo
More information about the Digitalmars-d
mailing list