What Makes A Programming Language Good

bearophile bearophileHUGS at lycos.com
Tue Jan 18 04:30:53 PST 2011


Vladimir Panteleev:

> I think we have a misunderstanding, then? Who ensures that the modules
> "just work"? If someone breaks something, are they thrown out of The Holy  
> Repository?

There is no single solution to such problems. It's a matter of creating rules and lot of work to enforce them as years pass.
If you talk about Holy things you are pushing this discussion toward a stupid direction.


> It also demotivates and alienates programmers.

Many programmers are able to understand the advantages of removing some unnecessary freedoms. Python has shown me that brace wars are not productive :-)


> I'm curious (not arguing), can you provide examples? I can't think of any drastic
> improvements to the package system.

I was talking about fixing bugs, improving strength, maybe later adding super-packages, and generally taking a good look at the literature about the damn ML-style module systems and their theory.


> So you think the subset of D that's CTFE-able is good enough to make an
> interactive console that's actually useful?

The built-in interpreter needs some improvements in its memory management, and eventually it may support exceptions and other some other missing things. Currently functions can't access global mutable state in the compile-time execution path, despite they don't need to be wholly pure. But in a REPL you may want to do almost everything, like mutating global variables, importing modules and opening a GUI window on the fly, etc. SO currently the D CTFE interpreter is not good enough for a console, but I think it's already better than nothing (I'd like right now a console able to run D code with the current limitations of the CTFE interpreter), it will be improved, and it may even be made more flexible to be usable both for CTFE with pure-ish functions and in a different modality for the console. This allows to have a single interpreter for two purposes. Most modern video games are partially written with a scripting language, like Lua. So a third possible purpose is to allow run-time execution of code (so the program needs the compile at run time too), avoiding the need of a Lua/Python/MiniD interpreter.

Bye,
bearophile


More information about the Digitalmars-d mailing list