Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×

Comment Re:Best short programs (Score 1) 204

Well I think part of what makes a higher level language is the potential for writing powerful special purpose languages in it easily.
Scheme and prolog both have macros and both have the ability to compile code at run time as well. Prolog also has the ability to define new operators. And it's awfully good at parsing, building and walking trees.

Comment Re:Best short programs (Score 1) 204

I'm more interested in optimizing how complete and high quality the result is, in a surprisingly short program than in meeting some context metric for program size.

My actual interest is the intuition that there are shockingly powerful methods hidden in more expressive programming languages with more exotic features.

Comment Re:Best short programs (Score 1) 204

Well I said "best" short programs. I suspect that that tiny program isn't "good", ie plays a crumby game.

Prolog is very good at encoding rules very succinctly and does depth first searches automatically (it's a bit harder to get more advanced search strategies, but it can be done.) Scheme has continuations so one could probably encode more kinds of search more succinctly than even prolog. Haskell has normal order lazy evaluation, so it's succinct to separate search strategies from state generation, though it might be hard to keep it from memoizing too much and running out of memory (I don't really have experience in Haskell).

Comment Re:Basic things make all the difference. (Score 0) 386

Also what I mean by "You can mess with objects in globally visible variables from multiple threads perfectly safely in Java." is from the point of view of the garbage collector.

For instance, in C++11, even with safe pointers you can can't safely modify a pointer from more than one thread, reachable objects can be collected - THAT kind of unsafe. And despite all of the "don't do that sort of dangerous thing" hysteria that goes around, the fact is that highly optimized multiprocessor algorithms have to do "unsafe things" under the covers.

No one has come up with a library that lets you do that sort of thing in C++11.

Comment Basic things make all the difference. (Score 0) 386

If D had garbage collectors as advanced and scalable as Java then it would be appropriate for even the largest projects.

It doesn't.

No one (except maybe .net) has caught up with Java on having a scalable garbage collector. Java's isn't perfect, but it's tunable too.

Similarly, java makes multithreaded/multiprocessor programming much safer than almost anything else. You can mess with objects in globally visible variables from multiple threads perfectly safely in Java. With or without garbage collection, that's very hard to do from C++11, I have no idea about D here...

So until other projects catch up on these sorts of basics people will stick to the engines that do the basics well. Having a great language is convenient, but it's not as important as having one with the needed capabilities.

Comment Irony (Score 1) 106

Ironically, the claim that it is possible to detect lies has always been a con. Polygraph detectors are made by con artists.

They can detect nervousness, nothing more. And of course if you lie to people that you can detect lies, that will make it a self fulfilling prophesy to the less intelligent.

Of course a normal level of neurosis and intelligence will make you nervous when they as you an incriminating question. But since when did authorities care what happens to intelligent people rather than to gullible employees or controllable masses?

Slashdot Top Deals

8 Catfish = 1 Octo-puss

Working...