Dynamic language

H. S. Teoh hsteoh at quickfur.ath.cx
Thu Mar 15 13:38:14 PDT 2012


On Thu, Mar 15, 2012 at 03:24:24PM -0400, Nick Sabalausky wrote:
[...]
> - If you can stomach the indent-scoping, Python is very well-regarded
> and has a lot of fancy advanced features.

I used to despise Python's indent-scoping too, though since then I've
had some opportunity to use Python for build scripts (google for SCons),
and I have to say that it certainly has its own kind of beauty to it.
You never have to worry about closing blocks in if statements and the
like, for example, and you never have subtle bugs like:

	auto func(bool x) {
		int y=0;
		if (x)
			y = 1;
			writeln("x is true");

		return y;
	}

But I certainly sympathize with the WAT sentiment when one first learns
that Python has indent scoping. :-)


[...]
> - If you're looking for the most painful dynamic experince imaginable,
> ActionScript2 should be at the top of your list. Make sure to use
> all-Adobe tools, and the newest versions of each, so the whole
> experience will be *truly* unbearable.

Shouldn't that be ActionScript3?

(And no, I would not touch any of this stuff with a 10-foot pole.)


> I admit though, I'm not very familiar with the extent of the
> metaprogramming abilities of any of those languages.
[...]

I can't say I'm familiar with all the languages you listed either, but
in my limited experience, I find that D's metaprogramming capabilities
outright beats every other language I know by a loooong shot.

C++ seems to come farther than most other languages, but its horrible
template syntax is just ... unpalatable. I mean, before C++11, even
something as straightforward as vector<vector<int>> is a syntax error.
How ridiculous is that?!  Nevermind the dubious wisdom of using <> for
template arguments in the first place (try, e.g., a template with bool
arguments that you want to instantiate with expressions that have
comparison operators).  Sure, C++ templates are Turing-complete. They're
also Turing tarpits for anything except the most trivial uses.

D templates + CTFE rox the sox off C++ any day.

(P.S. From what I heard, Lisp trumps D in metaprogramming abilities, but
I don't know Lisp so I can't comment on that.)


T

-- 
Windows 95 was a joke, and Windows 98 was the punchline.


More information about the Digitalmars-d mailing list