Self Optimizing Code

Chris Wright via Digitalmars-d digitalmars-d at puremagic.com
Thu Aug 4 20:53:22 PDT 2016


On Thu, 04 Aug 2016 18:39:36 +0000, Mark "J" Twain wrote:
> I would have to disagree about the language complexity though. At most
> the hardest part would be figuring out what syntax to use for symbols.

The cost with language changes isn't just implementation. The largest 
part is that people reading code in the language need to be able to 
recognize what a piece of code is doing. If it's not immediately obvious, 
that is a cost borne by everyone using the language.

Your suggested syntax is terribly inscrutable, and the easiest way to fix 
that problem is to use a library instead of a language change.

> Having to specify every parameter with some long sequence of 
> characters just makes it messy.

It would be far faster to implement a library solution. It would be much 
easier to maintain a library solution. A library solution could use 
functions in phobos and other libraries available in dub, not just 
druntime. A library solution could release much more often. It would be 
easier to configure -- for instance, random walk vs simulated annealing. 
It would be easier to specify and create constraints using a library 
solution. It would take no political effort to publish a library on dub.

But it would cost you an extra handful of characters, so it would be 
unusable.

Are you trolling?


More information about the Digitalmars-d mailing list