[OT] Re: C's Biggest Mistake on Hacker News

Abdulhaq alynch4047 at gmail.com
Sat Jul 28 15:36:43 UTC 2018


On Saturday, 28 July 2018 at 12:43:55 UTC, Laeeth Isharc wrote:
>
> It's tough when dealing with genuine - Knightian uncertainty or 
> even more radical versions.  When one doesn't even know the 
> structure of the problem then maximising expected utility 
> doesn't work.  One can look at capacities - Choquet and the 
> like - but then its harder to say something useful about what 
> you should do.
>

Sounds interesting, I'll look into it.

>
> But it's a loop and one never takes a final decision to master 
> D. Also habits, routines and structures _do_ shape perception.
>
>>
>> In truth I avoid discussions that are really just arguing 
>> about definitions of words, but you made a couple of sweeping 
>> bumper-stickery comments
>
> That's entertaining.  I've not been accused of that before!  
> Bear in mind also I tend to write on my phone.
>

I think I was just in need of a decent conversation. I didn't 
mean it in an accusatory manner :-). TBH I read those comments as 
coming from a D advocate who was in a motivational mood. They 
triggered a debate in me that has been wanting to come out, but I 
rarely contribute to forums these days.

> Yes I read Kahneman et al papers for the first time in 92 in 
> the university library.  I speed-read his book, and I thought 
> it was a bad book.  I work with a specialist in making 
> decisions under uncertainty - she was the only person able to 
> articulate to George Soros how he made money because he 
> certainly couldn't, and she is mentioned in the preface to the 
> revised version of Alchemy.  She has the same view as me - 
> behavioural finance is largely a dead end.  One learns much 
> more by going straight to the neuroeconomics and incorporating 
> also the work of Dr Iain Macgilchrist.
>
> Kahneman makes a mistake in his choice of dimension.  There's 
> analytic and intuitive/gestalt and in my experience people 
> making high stakes decisions are much less purely analytical 
> than a believer in the popular Kahneman might suggest.
>
> What I said about prediction being overrated isn't 
> controversial amongst a good number of the best traders and 
> business people in finance.  You might read Nassim Taleb also.
>

You're way ahead of me here, obviously. I didn't read any Taleb 
until he made an appearance at the local bookshop. It was Black 
Swan and it didn't say anything that hadn't independently 
occurred to me already. However, for some reason it seemed to be 
a revelation to a lot of people.

>
> Well it's a pity the D Android ecosystem isn't yet mature.  
> Still I remain in awe of the stubborn accomplishment of the man 
> (with help) who got LDC to run on Android.
>
> It's not that bad calling D from Java.  Some day I will see if 
> I can help automate that - Kai started working on it already I 
> think.
>

D as a programming language has numerous benefits over Java, but 
trying to analyse why I would nevertheless choose Kotlin/Java for 
Android development:

* The Android work I do largely does not need high low level 
performance. The important thinking that is done is the user 
interface, how communication with the servers should look for 
good performance, caching etc. Designing good algorithms.

* Having done the above, I want a low friction way of getting 
that into code. That requires a decent expressive language with a 
quality build system that can churn out an APK without me having 
to think too hard about it. Kotlin/JDK8 are good enough and 
Android Studio helps a lot.

* Given the above, choosing D to implement some of the code would 
just be a cognitive and time overhead. It's no reflection on D in 
any way, it's just that all the tooling is for Java and the 
platform API/ABI is totally designed to host Java.

* "The man who (with help) got LDC to run on Android". The team, 
with the best will in the world, is too small to answer all the 
questions that the world of pain known as Android can throw up. 
Why doesn't this build for me? Gradle is killing me... Dub 
doesn't seem to be working right after the upgrade to X.Y... it 
works on my LG but not my Samsung... I've upgraded this but now 
that doesn't work anymore...

* Will there be a functioning team in 5 years time? Will they 
support older versions of Android? Can I develop on Windows? Or 
Linux? Why not?., etc., etc.


> Since you already know D you need to answer a different 
> question.
>  What's the chance the compiler will die on the relevant 
> horizon, and how bad will it be for me if that happens.  
> Personally I'm not worried.   If D should disappear in a few 
> years, it wouldn't be the end of the world to port things.  I 
> just don't think that's very likely.
>

I answered the Android question already, as for engineering 
/scientific work (I design/develop engineering frameworks/tools 
for wing designers) python has bindings to numpy, Qt, CAD 
kernels, data visualisation tools. Python is fast enough to 
string those things together and run the overarching algorithms, 
GUIs, launch trade studies, scipy optimisations. It has even more 
expressive power than D and we use a typing library that makes it 
semi statically typed - good and sound enough for large code 
bases and development teams.

Despite our code using a typing library (enthought traits), the 
IDE doesn't know about that and hence suffers from the same 
problems as a D IDE will - it simply can't know what code might 
call that function you wrote, and what types are incoming. Still, 
given the huge number of quality python libraries and bindings 
into the big C++ libraries, that outweighs (currently) the great 
tooling for e.g. JDK8.

> Of course it depends on your context.  The people who use D at 
> work seem to be more principals who have the right to take the 
> best decision as they see it then agents who must persuade 
> others who are the real decision-makers.  That's a recipe for 
> quiet adoption that's dispersed across many industries 
> initially and for the early adopters of D being highly 
> interesting people.  Since, as the Wharton professor, Adam 
> Grant observes, we are in an age where positive disruptors can 
> achieve a lot within an organisation, that's also rather 
> interesting.

I agree entirely. They need to maintain their own motivation and 
create the product they want. I'm confident that D will do well.

When I read TDPL I was very excited. In that sense, I still am. 
In the decade since then I started a binding to Qt that got a 
long way (I wanted to use Qt/VTK from D) but then stopped as I 
didn't get enough momentum/motivation to finish it and Calypso 
came along. I felt the Andrei and Walter should have put all 
their weight behind it. Following the forums I don't think that 
has really happened.

Then, I am happy with the GC approach. I am coming from 
Java/Python (with smatterings from assembly to LISP), some C++ 
for a bit of self-flagellation, "because it's there". But the 
dlang focus on performance became so important and there was the 
big push to remove dependence on the GC, and to offer a reference 
counted alternative. Are either of these options mature? Without 
investing a lot of time to try them out, I can't make a 
judgement. I follow this forum but I still haven't managed to 
draw out an opinion from that data. I think that I no longer fall 
into the category of developer that D is after. D is targeting 
pedal-to-the-metal requirements, and I don't need that. TBH I 
think 99% of developers don't need it. We like to think we do and 
we love to marvel at the speed of improved code, but like 
prediction, it's overrated ;-)





More information about the Digitalmars-d mailing list