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

 



Forgot your password?
typodupeerror
Check out the new SourceForge HTML5 internet speed test! No Flash necessary and runs on all devices. ×

Comment Re:Venezuela is a 1 commodity market (Score 1) 658

'socialist' is a meaningless word, because everyone has their own definition. Is Norway more of a command economy than Venezuela? No, and 'command economy' is the topic here. tbh though I can't figure out what definition of 'socialist' you are using that has Norway more socialist than Venezuela.

Comment Re:Another SLOW Language (Score 1) 292

The JIT and the GC are the two parts of the VM that must be able to escape the constraints of the language model (the JIT must be able to generate executable code, which the Java security model doesn't permit, and the GC must be able to allocate memory and assign it a type and delete objects that are still reachable). Absolutely everything else in a JVM can be implemented in Java fully respecting the language model. You can write almost all of a JVM in Java, as long as you have a small amount of statically compiled Java code that is treated as trusted and so permitted to violate the language invariants. This is precisely how Smalltalk VMs are typically written. There is no requirement for C/C++ to implement Java, it's just an easy way of doing it.

Comment Re: Don't look at it that way... (Score 1) 154

If you're creating a database table, 64 bits doubles the size of the index column. If you're creating a database table in normal form, then you'll have a number of tables that are simply pairs of two indexes, so you will double the size of entire tables. That's going to have big cache and memory overheads and is definitely not a simple 'let's always do that' choice.

Comment Re:More features. (Score 1) 292

I honestly couldn't say. I learned C++ about 20 years ago, hated it, tolerated it a bit while working on LLVM, revisited it in C++11 and discovered that the language had changed beyond all recognition and didn't suck anymore. I like cppreference as a reference for the standard library, but I've not used a tutorial (and I definitely wouldn't recommend the old book that I read).

Comment Re:how about modules? (Score 1) 292

Yes, modules as proposed for C++ (which don't give you what the grandparent wanted: a clean separation between interface and implementation) are pretty easy. Clang has mature support for them and even some logic to implicitly generate modules from headers. They give you a compilation speedup, which is sorely needed for C++, but not the benefit that the grandparent was looking for, though they do at least require that you don't litter your headers with #ifdefs (which means C++ and C can't share modules).

Comment Re:C# vs Swift (Score 1) 79

The term to search for in the research literature is barrier elision. The new and shiny optimisations in Swift are things that garbage collected language implementations have been doing for around 30 years. Finalisers are a pain to support, but you either need to support them or you need some other mechanism for preventing non-memory resource (e.g. file descriptor) leaks.

Comment Re:C# vs Swift (Score 1) 79

The only GC mechanism that requires double the memory that you use is a semispace compactor. A lot of modern GCs use this for the young generation (if the space fits in the cache, it's very cheap, especially if you use nontemporal loads / stores when relocating the objects. Some work at Sun Research a decade ago showed that you could do it entirely in hardware in the cache controller very cheaply). Most GCs use mark-and-compact on smaller regions than the entire heap. You're right that you get some cache churn, but after the compact phase you're getting much better locality so your cache and TLB usage is improved during mutator execution.

Slashdot Top Deals

You need tender loving care once a week - so that I can slap you into shape. - Ellyn Mustard

Working...