News for hackers. Stuff that matters.
Re:On Markdown in Java documentation comments by usrusr on Tuesday January 24, 2023 @03:23PM (#34509717)
..and that preview renderer is presenting markdown just fine when the language doesn't happen to be java.

At the current trajectory of java making it to hn front page seemingly every day with yet another mosaic piece of trying to become kotlin, we can only hope for jetbrains ownership to not be easily tempted by Oracle dollars.

Re:On Markdown in Java documentation comments by rhdunn on Tuesday January 24, 2023 @03:45PM (#34510058)
With the evolution of any languages you get cross-pollination between them, be it lambda functions, var/val, Markdown comments, value classes, .... For example, Java borrowed generics from languages like C++, and C# borrowed them from C++ and Java.
Re:On Markdown in Java documentation comments by kmonsen on Wednesday January 25, 2023 @01:13AM (#34514991)
Is this true? I don't think it is. Generics is very different in all three and c++ and java has sort of the opposite implementation of generics.
Re:On Markdown in Java documentation comments by rhdunn on Wednesday January 25, 2023 @05:43AM (#34516767)
All 3 use the `Class<T>` syntax and have the ability to create functions that operate on any type. If they weren't influenced by each other (e.g. C++ allows you to specify a template/generic type for a function) they would have different syntax.

Java generics ended up the way they did because Java had/has a strong backward compatibility guarantee and wanted to fit into existing List/etc. interfaces and classes that work on objects. This resulted in the decision to erase the type from the runtime bytecode signature.

C# supports reified generics as a result of looking at how Java implemented generics and the problems that introduced. Microsoft were also in a position where .NET/CLR were at version 1, so made the decision to break the bytecode for version 2 in order to support reified generics.

Scala, Kotlin, and other languages have worked to follow the C# model as much as they can within the limitations of the Java bytecode/runtime.

Re:On Markdown in Java documentation comments by NovaX on Tuesday January 24, 2023 @05:37PM (#34511600)
Support for Markdown-based JavaDoc has been available since at least 2009 via multiple implementations [1, 2]. There have been many extensions thanks to the doclets api. The difference here is that Markdown will be included in the standard doclet and supported by the Java team instead of a 3rd party. Kotlin has few innovations and is rarely a source of inspiration for Java changes, e.g. Jetbrain's often called Scala a research language that they borrowed heavily from to design an industry language.

[1] https://code.google.com/archive/p/markdown-doclet

[2] https://github.com/Abnaxos/markdown-doclet