Skip to content

Instantly share code, notes, and snippets.

@nakshay
nakshay / java_rust_generic.md
Created March 6, 2020 03:55 — forked from Kimundi/java_rust_generic.md
A light comparison between Rust and Java generics and type system features.

Introduction

If you are familiar with Java's generics, and are coming to Rust, you might be lead to assume that its generics are working the same way.

However, due to the different type systems, and different implementation details, there are quite a few differences between generic code in both languages.

This document tries to give a short summary about those differences:

Core functionality

Java