Catch up on stories from the past week (and beyond) at the Slashdot story archive


Forgot your password?
DEAL: For $25 - Add A Second Phone Number To Your Smartphone for life! Use promo code SLASHDOT25. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. Check out the new SourceForge HTML5 internet speed test! ×

Comment Re:NP is the new P (Score 1) 497

Mod parent up. Turns out that problems that are impossible to solve in the general case often have solutions for most common cases. It's hard but really smart people have made real progress. And you can use the fruits of their efforts in SAT or SMT solvers. (As a programmer, your tools might well be using them without your knowing.)

Comment Re:Closure and Threads... (Score 1) 497

It's the other way round: closures shot dynamic binding dead. In general, lexical scoping is better for programming languages than dynamic scoping, in both theory and practice.

There's lots of information on the Internet about this but here's a quick link: https://courses.cs.washington....

Javascript has both lexical and dynamic scoping: 'this' is dynamically scoped and everything else is lexical. While 'this' is used extensively in Javascript, it's really a mistake. You can do all the useful 'this'-style things with closures alone, and it's easier to reason about.

Comment Re:yippie (Score 1) 89

Yes! The creators of Chicken Scheme think that it's more usable than C, at least under some circumstances, or they wouldn't have bothered creating it. That's the main point of compilers: they convert from the language you'd like to use into one that some machine will execute. Of course, you _could_ go the other way - C into Chichen Scheme - but nobody has any motivation to build that.

The compiler also guarantees certain properties of the object code. In a language with types, a successful compilation amounts to a proof by construction of the corresponding logical propositions (see

Comment Re: problems, lol (Score 1) 232

We have learned a lot since C was invented. Everything has weaknesses including C. Technical problems with C include but are not limited to:

* lack of memory safety and the resulting security issues
* null pointers, Tony Hoare's billion dollar mistake
* lack of import mechanism, and the resultant mess of includes

The main strengths of C are its maturity and ubiquity.

The most obvious competitor to C is Rust. That's currently less mature and less ubiquitous, of course. No tool is perfect.

Slashdot Top Deals

A large number of installed systems work by fiat. That is, they work by being declared to work. -- Anatol Holt