Ironwood is an ahead-of-time compiled, object-oriented language for high-performance native applications. It preserves the familiar Java syntax, object model, and everyday APIs that Java developers...

2 points•joas_coder•10 days ago•6 comments•

6 comments

joas_coder10 days ago
Ironwood is an interesting project: a Java-like, object-oriented language that compiles AOT to native executables, without a JVM, JIT, garbage collector, raw pointers, or Rust-style ownership.

Unlike GraalVM Native Image, which takes existing Java bytecode and packages the required Java runtime components into a native executable, Ironwood is a separate language designed from the start around native execution and explicit compiler-enforced safe memory management.

It uses LLVM, like Rust and Zig, so the native code produced can be very fast. It has a "defer" keyword for deferred cleanup, like Zig.

What do you think of the idea?

fithisux7 days ago
How close it to Java ? The documentation shows a lot of similarity but I need to investigate for non-trivial projects. There is a lot of Java software that can be ported. But it all boils down on how close it is. The closer, the less porting effort.

We definitely need something like this.

MiroslavPokorny10 days ago
What does no garbage collector actually mean ?
joas_coder10 days ago
public class Hello {

    public static void main(String[] args) {

        Chatter chatter = new Chatter();

        String text = "Hello " + chatter.getWord() + "!";
        System.out.println(text);
        free text; // destroy object and reclaim the memory

        free chatter; // destroy object and reclaim the memory

        // System.out.println(chatter); // use after free NEVER compiles
    }
}

// OR:

public class Hello {

    public static void main(String[] args) {

        Chatter chatter = new Chatter();
        defer free chatter;

        String text = "Hello " + chatter.getWord() + "!";
        defer free text;
        System.out.println(text);
    }
}
UncleMeat10 days ago
How does a UAF never compile without whole program lifetime and alias analysis?
MiroslavPokorny8 days ago
Whats to stop frees in the wrong place ?

Read the full thread on Hacker News →

Related stories