Evolutionary Programming!

Christopher Bergqvist via Digitalmars-d digitalmars-d at puremagic.com
Tue Jan 5 17:45:50 PST 2016


On Tuesday, 5 January 2016 at 16:10:21 UTC, Jason Jeffory wrote:
> Any more thoughts?

I empathize with you Jason. It's kind of like biological 
evolution that has progressed through organisms spawning new 
generations and dying, and some humans' search for immortality. 
Being free from aging and disease would lead to a different kind 
of evolution happening within the same generation, through 
technology.

This new language would not have to die out and be replaced as 
progress is made, and it would have a capability of evolving 
without growing enormous scars like C++.

Key to a clean evolution is robust upgrade-ability of source code 
IMO. If the language designers add the dimension of @safe as an 
after-thought, an upgrade script could be run on old source-code 
that would tag all valid functions as @safe, (or better; tag 
unsafe functions as @unsafe).

I'm leaning toward live-editing AST's instead of raw text for 
robust, quick upgrades and quick compilation times. The tree 
could be stored in XML/JSON/binary, but be edited in a different 
view. AST editing would also fix the issue that beauty is in the 
eye of the beholder (programmer), as the same program tree could 
be visualized/skinned in different ways. The same programmer 
could also be writing programs with different defaults (such as 
@safe/@unsafe) depending on context (short term shell scripts vs 
aviation-software). The reason similar AST projects have failed 
in the past AFAIK is that it's very very hard to build pleasant 
to use editors and viewers/diff-tools. Programmers are married to 
their editors (https://www.youtube.com/watch?v=qzC5H5xrr-E oh 
Andrei :) ).

Bikeshedding in language forums would also go down a lot if 
programmers could re-skin keywords, brackets, indentation etc. :)

Regarding the struggle for immortality, I think the death/life 
cycle still provides a way of evolution that is preferable in 
many ways. Having different languages provides immunization from 
madness that might take down the "one true language". I would 
love to see AST-based/structured languages succeed alongside 
text-based languages like D some day, and see the degree of 
duplicated programmer hours go down.

Cheers,
Chris


More information about the Digitalmars-d mailing list