Hacker Newsnew | past | comments | ask | show | jobs | submit | PaulFreund's commentslogin

Don't forget D


D is fine language and a pleasure to program in, but with it's required garbage collector, it's not really in the same niche as C/C++/Rust. I think the hallmark of this niche is the ability to run without a garbage collector penalty and the accompanying lack of determinism.


Oh not again the GC argument.

D is the one true C++ without pretending being a superset of C. Rust is more modern than C++ and better in programming in the large. But D is really for low level programming and a good target for code generation. For me it is a good replacement for C++ and Delphi. It is even a good fit for areas touched by Java and C# like desktop and scientific apps. But it is not there yet because of lack of serious tooling and lack of bytecode but for the second disadvantage you earn performance. Nimrod for example could address this (with D as a code generation target).


You can use D without using the GC. I'm not sure why this myth keeps coming up. It's always supported manual memory management. You have to sacrifice some language features that aren't even available in C++ and some parts of the standard library use the GC but that is easy to avoid with yesterday's 2.066 release and the @nogc attribute. 2.067 should also have a lot of the standard library switched to using lazy algorithms where possible which means the caller gets to determine the allocation strategy (and can often avoid allocation entirely).

void main() @nogc { /* ... */ } // this program doesn't use the GC


Ordinary C++ with good old RAII do use something akin to garbage collection: many classes, when constructed, allocate memory on the heap, then free that memory when they fall out of scope.

Malloc() and free() aren't exactly predictable. If you really want guarantees, you need to write your own custom allocator, and if you don't need those guarantees, garbage collection is probably enough for your purposes.

Basically, if you're using C++ without real manual management, with custom allocators, pools, and all, you probably didn't need C++ in the first place.


RAII is a form of automatic resource management, it's true. It is, however, a deterministic form of automatic resource management.

This is not to say that the underlying allocator is necessarily deterministic, but you're making a false dilemma here by putting it in opposition to making decisions about custom allocators and pool allocators. You can use RAII with custom allocators. You can use RAII with memory pools.

And that's where C++ really does shine. It's a niche that hasn't even really been attempted much, let alone that it's been surpassed in.


With Nimrod, you can manage your own memory, or use the Boehm GC. It compiles to C/C++ with native code generation not dependent on a VM, and the Pythonic syntax makes writing such code as easy as common scripting languages [1].

1: https://github.com/def-/nimrod-unsorted


You mean like Mesa/Cedar at Xerox PARC, Oberon at ETHZ, Modula-3 at Olivetti...


I'm currently working on integrating this in my app. I really like the combination of json-schema and json as a protocol. Where no custom UI is defined json-editor jumps in to save the day.



For me it runs with the correct speed (as measured with the ingame timer and I'm glad to see it's open source :) Nicely done!


It always amazes me how often topics I currently work on come up here. I am currently thinking about using http://www.chaiscript.com/


Another way to look at this is to be happy that they had to ask for the password...


While it means that customer repcan not see the password or that the password is hased, they should have a system to let them acces your account without asking for your password.


Rotation is possible. Activate the (rotate indicating) tool and move the resize/move/rotate handles.


Ah, sorry. It works in such a non-obvious way, I missed it.


The rotation tool works exactly the way Illustrator's does.


In, it doesn't.


1) Select an object

2) Select the rotate tool (whose icon is the universal symbol for "rotate" that can't possibly be confused with anything else)

3) Click once to define an origin

4) Click and drag to interactively rotate about that origin.

This is how the Illustrator rotate tool has worked since, literally, Illustrator 1.0.


In Illustrator you don't have to do step 1 or 3.


You don't get the point of this, do you?


You have to plug it in the USB port too to supply it with power


That sounds awful, how long ago did this happen? I had extremely good support both times one of my drives failed, I just followed their tutorial on drive replacement and they plugged me the new drive. After that I let the RAID replicate to the new drive and was done. I'm from Germany so I don't know if the support is a different one for me, but they never asked me to pay for a replace.


I'd rather not bug the team members with my personal curiosity. I rather hoped to have missed some pointers torwards their work and achievements


Don't be shy, ask them. Worst case scenario is they won't want or be able to talk to you.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: