May 31, 2015
On Sunday, 31 May 2015 at 08:51:00 UTC, Atila Neves wrote:
> 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.

In what case is this true? If it is only to avoid some boiler plate then it is not a good excuse, IMO. You can usually avoid macros by restructuring composition (using multiple layers of templates).

Anyway, cpp is a separate language from c++ so it only affects AST related tooling that modify source files where macros are present. It is overall more separate than builtin textual substitution (which is generally a bad idea) since it is a discrete independent step that a tool easily can apply before analysis.
May 31, 2015
On Sunday, 31 May 2015 at 09:08:28 UTC, Joakim wrote:
> On Sunday, 31 May 2015 at 07:54:29 UTC, Paulo Pinto wrote:
>> 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++).
>
> You seem to dismiss game development as some niche, when it is one of the main killer apps driving the mobile boom.  Around 80% of the top paid apps on iOS and Android are games:
>
> https://www.appannie.com/apps/google-play/top/united-states/


I don't know how you got to understand that. My point was that C++/CX was pushed
to be at the same level as C# and VB.NET for WinRT applications, specially for
the MFC users.

However, apparently only game developers cared to pick it up and it has been ignored by traditional business developers, this was my point.

And a big complaint was having to manually make use of COM interop to access DirectX from .NET languages or being forced to write WinRT wrappers in C++/CX.

So as of Windows 10, DirectX is also exposed as WinRT compoments.

>
> Most mobile games are written in C/C++/OpenGL, to the point where google even makes their Play Games Services APIs available as C++ headers, which they don't do for most of the rest of their Java-only APIs:
>
> https://developers.google.com/games/services/cpp/gettingStartedAndroid
>

If you knew Android development, you would know that Google Games API was Java only.

Here are the videos from Google explaining to NDK users how to write themselves the respective JNI wrappers to the API.


https://www.youtube.com/watch?v=zst3R1OP6Y0

Only after a huge backslash from game developers did they port the API to C++.


In many cases those games are being written in Java (LibGDX), Unity, Cocos-2D, with C++ for the graphics and sound layer only.


> As for WinRT, almost nobody uses Windows Phone and Windows 8 was a huge bust, especially Modern apps, so that's neither here nor there.

Nobody in US, yes.


In South America, Eastern Europe and some southern Europe countries it is a bit different.

In Portugal for example, you will see more people with Android and Windows Phone than iOS.


>
> You're right that google keeps pushing Java into the spotlight, but it is native development that is actually doing well, pushing Java back into library mode for google's Java-only APIs.  Perhaps that's why they compile Java Ahead-Of-Time since the recent Lollipop release. :)

They are late to the game there. As Android was the only platform still using a JIT.

iOS never used one and Windows Phone 8 always had .NET compiled to native code.

Dalvik was just a lame "good enough" VM implementation, so I guess they really needed to do something there.

--
Paulo
June 01, 2015
On Sun, 31 May 2015 07:54:26 +0000, Paulo Pinto wrote:

> 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.

and the fact that it's way easier to write a C-like macro than C++ template. ;-)

June 01, 2015
On Sun, 31 May 2015 09:08:27 +0000, Joakim wrote:

> Most mobile games are written in C/C++/OpenGL

that will fade away soon. it's safe to ignore that in long-time plan.

June 01, 2015
On 1 June 2015 at 10:56, ketmar via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
> On Sun, 31 May 2015 09:08:27 +0000, Joakim wrote:
>
>> Most mobile games are written in C/C++/OpenGL
>
> that will fade away soon. it's safe to ignore that in long-time plan.

How so? Game dev's aren't moving away from native code any time soon...
June 01, 2015
On Monday, 1 June 2015 at 03:38:44 UTC, Manu wrote:
> On 1 June 2015 at 10:56, ketmar via Digitalmars-d
> <digitalmars-d@puremagic.com> wrote:
>> On Sun, 31 May 2015 09:08:27 +0000, Joakim wrote:
>>
>>> Most mobile games are written in C/C++/OpenGL
>>
>> that will fade away soon. it's safe to ignore that in long-time plan.
>
> How so? Game dev's aren't moving away from native code any time soon...

a large portion of ios, android, and steam games use unity, which outside of the core engine uses mono for programming.
June 01, 2015
On Monday, 1 June 2015 at 03:38:44 UTC, Manu wrote:
> On 1 June 2015 at 10:56, ketmar via Digitalmars-d
> <digitalmars-d@puremagic.com> wrote:
>> On Sun, 31 May 2015 09:08:27 +0000, Joakim wrote:
>>
>>> Most mobile games are written in C/C++/OpenGL
>>
>> that will fade away soon. it's safe to ignore that in long-time plan.
>
> How so? Game dev's aren't moving away from native code any time soon...

 Objective-C, Swift, Java (as of Android 5) and .NET on mobile OSes aren't no less native than D.

All of them compile to pure native code. There isn't any VM running on the device.

_
Paulo
June 01, 2015
On 1 June 2015 at 14:05, weaselcat via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
> On Monday, 1 June 2015 at 03:38:44 UTC, Manu wrote:
>>
>> On 1 June 2015 at 10:56, ketmar via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
>>>
>>> On Sun, 31 May 2015 09:08:27 +0000, Joakim wrote:
>>>
>>>> Most mobile games are written in C/C++/OpenGL
>>>
>>>
>>> that will fade away soon. it's safe to ignore that in long-time plan.
>>
>>
>> How so? Game dev's aren't moving away from native code any time soon...
>
>
> a large portion of ios, android, and steam games use unity, which outside of the core engine uses mono for programming.

Ah, yeah, but Unity itself is all C code. Every modern game has a scripting solution, just that Unity has made that interface front-and-center. Lots of meaty Unity plugins are native too.
June 01, 2015
On Monday, 1 June 2015 at 05:14:59 UTC, Manu wrote:
> On 1 June 2015 at 14:05, weaselcat via Digitalmars-d
> <digitalmars-d@puremagic.com> wrote:
>> On Monday, 1 June 2015 at 03:38:44 UTC, Manu wrote:
>>>
>>> On 1 June 2015 at 10:56, ketmar via Digitalmars-d
>>> <digitalmars-d@puremagic.com> wrote:
>>>>
>>>> On Sun, 31 May 2015 09:08:27 +0000, Joakim wrote:
>>>>
>>>>> Most mobile games are written in C/C++/OpenGL
>>>>
>>>>
>>>> that will fade away soon. it's safe to ignore that in long-time plan.
>>>
>>>
>>> How so? Game dev's aren't moving away from native code any time soon...
>>
>>
>> a large portion of ios, android, and steam games use unity, which outside of
>> the core engine uses mono for programming.
>
> Ah, yeah, but Unity itself is all C code. Every modern game has a
> scripting solution, just that Unity has made that interface
> front-and-center. Lots of meaty Unity plugins are native too.

Since last Unity version, C# is also compiled to native code via IL2CPP.
June 01, 2015
On Monday, 1 June 2015 at 05:20:27 UTC, Paulo Pinto wrote:
> On Monday, 1 June 2015 at 05:14:59 UTC, Manu wrote:
>> On 1 June 2015 at 14:05, weaselcat via Digitalmars-d
>> <digitalmars-d@puremagic.com> wrote:
>>> On Monday, 1 June 2015 at 03:38:44 UTC, Manu wrote:
>>>>
>>>> On 1 June 2015 at 10:56, ketmar via Digitalmars-d
>>>> <digitalmars-d@puremagic.com> wrote:
>>>>>
>>>>> On Sun, 31 May 2015 09:08:27 +0000, Joakim wrote:
>>>>>
>>>>>> Most mobile games are written in C/C++/OpenGL
>>>>>
>>>>>
>>>>> that will fade away soon. it's safe to ignore that in long-time plan.
>>>>
>>>>
>>>> How so? Game dev's aren't moving away from native code any time soon...
>>>
>>>
>>> a large portion of ios, android, and steam games use unity, which outside of
>>> the core engine uses mono for programming.
>>
>> Ah, yeah, but Unity itself is all C code. Every modern game has a
>> scripting solution, just that Unity has made that interface
>> front-and-center. Lots of meaty Unity plugins are native too.
>
> Since last Unity version, C# is also compiled to native code via IL2CPP.

Only because of mono's license update, it's why they've been using a nearly decade old mono for so long.