this post was submitted on 13 Nov 2024
812 points (96.1% liked)

Greentext

4385 readers
1293 users here now

This is a place to share greentexts and witness the confounding life of Anon. If you're new to the Greentext community, think of it as a sort of zoo with Anon as the main attraction.

Be warned:

If you find yourself getting angry (or god forbid, agreeing) with something Anon has said, you might be doing it wrong.

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] pivot_root@lemmy.world 1 points 1 day ago* (last edited 1 day ago) (1 children)

Edit: I misread your comment as "like in C#" and wrote this as an answer to the non-existent question of "can't you use explicit interfaces like in C#"

I haven't kept up with recent Java developments, but with Go, you're out of luck. Interface implementations are completely implicit. You don't even have an implements keyword.

Edit: For Java, a cursory search suggests that they haven't yet added explicit interfaces: https://stackoverflow.com/questions/19111090/does-java-support-explicit-interface-implementation-like-c

[–] Amir@lemmy.ml 2 points 1 day ago (1 children)

He mentioned C#, which does let you explicitly choose to implement same-name functions of two interfaces with different code

[–] pivot_root@lemmy.world 3 points 1 day ago

For some reason, my brain inserted a "like" before "C#", and answered the question of "can't you use explicit interfaces like C#."