Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Java needs better Javadoc

Name: Anonymous 2008-09-05 4:50

What the deal with Javadoc?

That shit is non-semantic and non-standard and totally needs a revamp!

Who's with me.

Name: Anonymous 2008-09-08 8:02

>>40
A hashmap implementation shouldn't take more than 300-400 lines. You might have two problems.

Name: Anonymous 2008-09-08 19:29

>>41
A hashmap implementation in Java can take any amount of lines. Sun isn't known for concise code.

Name: Anonymous 2008-09-08 19:36

>>41-42
http://www.docjar.com/html/api/java/util/HashMap.java.html

1055 lines.
Though in fairness, two thirds of that is comments and a good example of what's wrong with XML-based autodocumentation.

Name: Anonymous 2008-09-08 19:59

>>43
Honestly, I think that's pretty reasonable. The language itself lacks quite a few constructs to make the implementation really usable though -- the generics support is useless at best, and lack of first-class functions makes collection manipulation excessively verbose.

But as far as that example, it's a fairly sane code snippet.

Name: Anonymous 2008-09-08 20:18

>>43
The code itself is pretty concise, it just has a shitload of Javadoc comments.

Name: Anonymous 2008-09-08 20:33

>>44,45
The code itself is almost as concise as it could be, and pretty close to how I'd write a hashmap in Java, but it's still much longer than it has to be because Java is such a crap language. Literate programming in it is a pain in the ass compared to even Javadoc documentation.

Name: Anonymous 2008-09-08 20:45

      `D\D\.-
      (0.0  \
      \`-'J  )
       -    -\
       (|| (  J_
       c_|-c_J--,)

i am a JAVA. i ahev a long doc and i make programs w/ my API. if you dont repost this comment on 10 other pages i will hax your anus tonight and make a mess of your computer and ass

Name: Anonymous 2008-09-08 21:07

>>43
a good example of what's wrong with XML-based autodocumentation.
Not really.  The docs aren't meant to be read in that format; they're pretty good in the normal browser.

No human should EVER have to be exposed to XML; it should be equated to hex dumps for usability purposes.

Name: Anonymous 2008-09-08 21:51

>>48
Yet the entire reason for using such a ridiculous format is so it can be read and manipulated in a text editor.

Name: Anonymous 2008-09-08 21:55

>>48
The docs aren't meant to be read in that format, but the source code is. They reduce the legibility of the source by cluttering everything up.
And they may not be meant to be read like that, but they're meant to be written like that.

Name: Anonymous 2008-09-08 23:09

>>49
No, it is for document interchange.

Name: Anonymous 2008-09-08 23:31

>>51
Human readability is the most important reason XML was developed in the first place.
Honestly, the only sensible application I've ever seen of XML is XHTML. Which, I guess, makes sense.

Name: Anonymous 2008-09-08 23:40

>>44
useless at best
Useless how? It's far superior to SEPPLES' take on generic programming. I suppose the fact that Java generics are purely a compile-time construct is limiting somehow, but I haven't used anything with runtime generic type information, so I can't speak to the advantages of, say, C#'s approach.

Name: Anonymous 2008-09-09 0:25

>>53
Templates in Sepples aren't so much generics as they are a demented compile-time language which can be used to implement generics. Having a Turing-complete static language is fucking overkill, and opens the floodgates for terribly monstrous over-engineered attempts to add functionality to an otherwise lacking language (ie, Boost et al).

Java's generic support has the exact opposite problem -- they're just glorified type-checking sugar. There's no support to do any kind of compile-time specialization. Because all parametrized instances of a template are reduced via type erasure to the same class, you can't safely use static members of a generic class. Type erasure also means that you have to explicitly state which interfaces parameter types must implement before you can have any reasonable interaction with them.

Rather than comparing it to C# (since I don't really have much knowledge of C#'s generics, but I hear they've got some pretty cool shit in 3.5; too bad Mono's only at 2.0) which has a fairly similar generics model; I'd take it a step further and put Sepples/Java/C# generics next to a duck-typed language or a type-inferred language, which make everything essentially a generic, or allow implicit generics, respectively.

Name: Anonymous 2008-09-09 1:30

C# generics themselves didn't really change much for C# 3.0 (which ~= .NET 3.5), the main things were LINQ, extension methods and lambda stuff. Also, the Mono C# compiler now supports C# 3.0, even though its runtime is older (I think).

As I understand it, C#'s generics are slightly better than Java's in that reference types boil down to the same class but value types get their own optimized version (no boxing), though they don't actually permit any form of specialization.

Name: Anonymous 2008-09-09 17:10

>>54
Having a Turing-complete static language is fucking overkill, and opens the floodgates for terribly monstrous over-engineered attempts to add functionality to an otherwise lacking language
So, what you're saying is "Lisp macros considered harmful" ?

Name: Anonymous 2008-09-09 17:16

>>52
XHTML is pig disgusting and should never be used. Instead, try: HTML 5

Name: Anonymous 2008-09-09 17:40

>>56
static

Name: Anonymous 2008-09-09 17:46

>>58
compile-time

Name: Anonymous 2008-09-09 17:52

>>57
HTML 5 is XHTML without any of the elegance and far more ENTERPRISE-READY bullshit.

Name: Anonymous 2008-09-09 18:01

Name: Anonymous 2008-09-09 18:04

>>60
In case you haven't noticed, W3C is all about ENTERPRISE QUALITY.

Name: Anonymous 2008-09-09 18:18

>>52
If human readability was XML's goal, they failed horribly. XML is a goddamn eyesore.

Name: Anonymous 2008-09-09 18:32

>>59
No, that was not the key word. Try again.

Name: Anonymous 2008-09-09 18:34

>>64
lrn2readingcomprehension

Name: Anonymous 2008-09-09 18:48

>>60
XHTML without any of the elegance
XHTML
elegance

lol

Name: Anonymous 2008-09-09 19:57

>>63
1. Beauty is subjective.
2. It has more goals than just readibility. I cannot think of any other way to hierarchically markup some text and still remain as readable as XML.

Name: Anonymous 2008-09-09 20:19

>>67
6/10, obvious troll but I lol'd

Name: Anonymous 2008-09-09 20:21

>>67
TeX

Name: Anonymous 2008-09-09 21:06

>>69
TeX
He said hierarchically.

Name: Anonymous 2008-09-09 21:56

>>70
TeX2EE

Name: Anonymous 2008-09-09 23:27

>>67
1. Beauty is subjective.
Are you saying you've got an XML fetish, or just that there may be someone somewhere who does?

Name: Anonymous 2008-09-09 23:31

It compresses excellently. The problem is the decompression.

Name: Anonymous 2008-09-10 11:01

>>72
I don't care for the physical look of the textual elements ordered in the manner required to describe XML. I also happen to work well well with deeply nested Scheme code.

Name: Anonymous 2008-09-10 18:09

I'd like to work deeply nested in Leah Culver's Scheme code, if you know what I mean.

Name: Anonymous 2008-09-10 18:16

>>75
I'd like to work forcibly indented in Leah Culver's Python code, if you know what I mean.
FIXED

Name: Anonymous 2008-09-10 19:26

>>76
XML does not mandate indentation. Your post makes no sense.

Name: Anonymous 2008-09-10 23:02

I'd like to evaluate my lambda on Leah Culver's pair, if you know what I mean.

Name: Anonymous 2008-09-11 14:03

>>23

yeah, if you use 10 yo webbrowsers.

Name: Anonymous 2008-09-11 15:13

i'll use however many webbrowsers i want yo

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List