| Feature | Java | Scala | Kotlin | Rust | Go | Zig | Python | JavaScript | TypeScript |
|---|---|---|---|---|---|---|---|---|---|
| Implementation Strategy | Type erasure | Type erasure (JVM) but with TypeTag/ClassTag | Type erasure (JVM) but with reified for inline | Monomorphization | GCShape stenciling (hybrid) | Monomorphization via comptime | Runtime duck typing, optional static analysis | No type system | Structural type system, compiles to JS |
| Syntax | <T> angle brackets |
[T] square brackets |
<T> angle brackets |
<T> angle brackets |
[T] square brackets |
comptime T: type parameter |
[T] square brackets (3.9+) |
N/A | <T> angle brackets |
| Type Checking | Compile-time, mandatory | Compile-time, mandatory | Compile-time, mandatory | Compile-time, mandatory | Compile-time, mandatory | Compile-time, mandatory | Optional via external tools (mypy) | ❌ None | Compile-time, optional enforcement |
| Runtime Type Enforcement |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Please, feel free to make any question. | |
| Happy to help. | |
| Juan Antonio |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //jbang --java 25 HelloWorld.java | |
| void main() { | |
| IO.println("Hello World"); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://developers.redhat.com/blog/2016/12/09/spring-cloud-for-microservices-compared-to-kubernetes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <plugin> | |
| <groupId>org.apache.maven.plugins</groupId> | |
| <artifactId>maven-enforcer-plugin</artifactId> | |
| <version>3.5.0</version> | |
| <executions> | |
| <execution> | |
| <id>enforce</id> | |
| <configuration> | |
| <rules> | |
| <dependencyConvergence /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://github.com/gayanvoice/top-github-users/blob/main/markdown/public_contributions/spain.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ¯\_ (ツ)_/¯ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.stream.IntStream; | |
| public class XDemo { | |
| public static void main(String[] args) { | |
| int r = 16; | |
| IntStream.rangeClosed(-r, r) | |
| .map(Math::abs) | |
| .peek(i -> IntStream.rangeClosed(-r, r) | |
| .map(Math::abs) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.math.BigInteger; | |
| import java.util.stream.Stream; | |
| public class ShiftDemo { | |
| public static void main(String[] args) { | |
| System.out.println("Hello, World!"); | |
| int bignr = 1146423427; | |
| int widthdiv = bignr / 3; |
NewerOlder