« first day (1527 days earlier)      last day (3408 days later) » 

6:01 PM
@Unihedro It isn't. See
 
@Nooble The content you linked to has zero effectiveness to disproving my code demo.
 
@fge Eh... or you could just use a language without null like Haskell?
 
@FredOverflow In that case, why are you here in the Room of Java?
 
@fge Genius.
 
@Unihedro lol I didn't realise, must have followed some link.
 
6:04 PM
@fge Alternatively, what about using less horrible language?
 
@milleniumbug #define horrible sophisticated
 
@Unihedro good luck with that
 
am sad that @milleniumbug does not appreciate the C usage
they don't deserve the better languages it seems, /me thinks to self
 
fge
@FredOverflow I want a language in which I can do useful, practical stuff
Haskell isn't it
 
You can do practical stuff in it. But I agree that the ecosystem is very small. Too small.
 
fge
6:11 PM
Honestly, it just looks like it's troll mating season on the Java chatroom
 
What makes you think I'm a troll?
I just find some of your opinions funny.
 
fge
Well, you talk and don't act
I act
 
Act?
Does that mean that everyone having a discussion is a troll?
 
@fge how to disable line wrap?
 
Is the troll being trolled? Who is doing the trolling! xD
 
6:14 PM
41 mins ago, by Unihedro
Life can be a whole lot more productive.
@Michael Well, it's only fourty minutes in, and the tables are already turning.
 
Meta-trolled.
Troll-ception, etc
 
It looks like you guys don't know what a troll is.
 
So... How can I disable this:
 
fge
@Unihedro what do you mean exactly by line wrapping?
 
(I was told IntelliJ would be easy to use...)
@fge see pic
 
fge
6:15 PM
Ah, that
Uhwell, somewhere in the editor, I guess
 
@Unihedro Life Lesson #23: When someone tells you something is easy to use, it's usually not.
 
Java has class decorators?
 
fge
Usually I just type, let it wrap then use vim, $, J, $, J :p
 
@fge It works!!!
@Michael :D
@Jefffrey did you just invest your time debating about a language feature of a language you don't even know?
 
fge
(not even the need for the $ in fact)
 
6:16 PM
> feature
I don't know much about Java, but feel free to correct me if I'm doing mistakes (like the primitive types thingy before).
 
@Jefffrey Read the link in the room description.
 
fge
@Jefffrey no, and it can't make coffee either; but guess what? You can do stuff with it. Yes, despite the fact that it has null (see earlier comment about that)
And it has annotations
 
@fge What do you mean by annotations?
 
Ctr+Shift+A line wrap "wrapping long lines" YES
 
fge
Class-level, method-level, parameter-level, declaration-level and even annotation-level
And annotation processors
 
6:20 PM
@fge I was just commenting on @Override. In python @x before a method or class is a decorator.
 
@Jefffrey annotation
 
2 mins ago, by Jefffrey
@fge What do you mean by annotations?
 
fge
@Jefffrey there is not only @Override
There are PLENTY of options for annotations
 
@SuppressWarnings("compilation")
 
@Unihedro Does you IDE know any words? :P
 
fge
6:21 PM
See @RetentionPolicy, @RetentionTarget
(the javadoc for these)
 
@Gemtastic It's only my second day using intellij... I'm so lost :p
 
fge
OK, Function done
 
You're a student right? @Gem
 
fge
Now, BiFunction
 
Are annotations like compiler hints?
 
6:22 PM
@Jefffrey They can be compiler hints. There are also runtime-retention annotations.
Really, just google this.
 
@Unihedro Ah, I see :P
@Unihedro Yes
 
fge
They can also be used for static analysis tools such as FindBugs
They can also be useful documentation (since some of them are @Documented)
 
FindBugs is gr8
 
fge
@DontLookAtTheCodeItSucks
(@Documented, @RetentionPolicy(CLASS), @RetentionTarget(CLASS, METHOD))
 
@Unihedro How so?
 
6:29 PM
6 mins ago, by Unihedro
https://www.jetbrains.com/student/
student license for intellij if you need to switch to it for some weird reason
 
Off to lunch. Later all.
 
it has a Swing window builder
 
@Unihedro Ah
 
Seeya @Michael!
 
@fge F# doesn't have null, unless you interact with other .NET languages.
 
6:33 PM
@FredOverflow directly implying that F# is a useful language, well done
 
Is it not?
 
Imagine the buzz kill if you celebrated christmas based on reality. "Here you go little Jimmie! A gift from Xian Jin in china and Pin Kyun in taiwan!" - "An iPad! Yaay!" -"Say thank you to them for getting occupational cancer so that you could have this!"
^Why I should never have kids
 
@FredOverflow He is trying to "troll", or something.
 
@Jefffrey no, I'm not amused by your attempt(s) to prove that nulls are a mistake, simply because your "proof"'s that you don't know how it works / some other unimportant language "fixes" this (where it's not broken on the first place)
 
I don't know how it works? How so?
 
fge
6:42 PM
Well, you keep talking about it being a mistake, which means you can't handle it, right? cf my earlier comment
 
If it really is a problem to you then you may as well stare at something that pleases you more and code with it. This entire conversation should be taken somewhere else because it doesn't discuss anything. I'm going to trash any more bits of it incoming, even though no one recommended to.
 
fge
It is there, live with it, if you don't want to/can't, go find a language which doesn't have it
 
@fge No?
 
fge
And I wish you good luck to find one where you can actually do stuff
 
^
 
fge
6:43 PM
I must be a sore to your eyes, man, since I also use (and love) C
 
I'm doing "stuff" in Haskell no problem.
 
fge
But I don't give a beep
 
@Jefffrey Seriously, we're not your professor, we're not going to judge whether you're doing stuff with problems.
 
And I don't work in Java so I really have no idea what you mean by "you can't handle it".
 
fge
"stuff" in quotes -- means everything
 
6:44 PM
What I do in Haskell is irrelevant.
 
fge
Then go complaining to some other language rooms which also have null or equivaelnt
 
I'm trying to discuss language design with you people.
 
fge
Python, for instance
 
What would you have other than null to specify if a variable is not pointing to an object?
Dummy object?
 
fge
@VinceEmigh with Guava, Optional
 
6:45 PM
@VinceEmigh Optional
 
@Jefffrey no you're not discussing, you're throwing points into the air
 
fge
And with Java 8 too
 
and I can't see lines
 
fge
But it's HEAVY compared to a simple IFNULL in bytecode
 
@Unihedro "throwing points in the air"?
 
6:45 PM
@Jefffrey into
 
what does that mean?
 
@VinceEmigh I discussed this above (scroll up, and hit "more messages" where necessary), null exists AND WORKS because we don't need no dummy objects and unnecessary Optionals.
 
fge
@Jefffrey the fact that you have so much time on your hands to come and discuss such an irrelevant point makes me think that you don't do that much stuff in Haskell -- why don't you code instead of bothering (discussing such a futile point with) us?
@Jefffrey if you want to discuss language theory --> cstheory.stackexchange.com
 
And boring contexts and boilerplate IF null(obj) and all that our dear Jefffrey defend for
 
@fge I had no idea I was bothering you.
I thought I could discuss views that are different from mine in a civil way.
 
6:47 PM
Yeah i know about optional, but doesnt that return a dummy object? You have to specify an instance using ofElse, yeah? (never actually used Optional myseld)
 
@VinceEmigh Neither did I.
 
Aren't nulls cheaper?
 
fge
I know null and I jsut live with it
That's all
 
I compare it to Maybe a in Haskell.
 
@VinceEmigh If you use has() on Optional, it tells you whether it actually has an object (and therefore null counts as one), and get() returns null for both null and doesn't have anything
 
fge
6:48 PM
@VinceEmigh in Java, certainly so
 
Which is pointless at best, it's 1. expensive and doesn't improve flow unless you're repeating this five thousand times 2. bloating 3. ugly
 
fge
Each method you call on an Optional is an invokevirtual
 
@VinceEmigh If you mean performance wise, they probably are, but I highly doubt that's the bottleneck of any application.
 
fge
Checking for something != null is just a ifnull and a jump
It's WAY cheaper
 
@Unihedro You can use map
 
fge
6:50 PM
And I guess that in haskell, Maybe is a builtin type which also calls something like ifnull behind the scenes
 
@Jefffrey You can use if (null == and then do something more effective than expecting this rather obscure opportunity for it to be empty
 
@fge But probably not to the point where it matters. At any time.
 
fge
@Jefffrey you are probably wrong on that one
 
Possible.
 
@Jefffrey I'm sorry but this assumption doesn't back up anything.
Optional is still unnecessarily performance-bad.
 
6:51 PM
Micro optimizations.
They are evil.
 
Well they do allow you to replace the possibility of errors
 
Battling to your skull about null without proper evidence: That was pretty evil.
 
I gotta agree with both sides honestly
 
fge
This is not CS Theory, this is Java
 
6:53 PM
So?
You are not open to CS Theory?
If so, why?
 
fge
I am, just not on such petty matters; my priority in CS theory is learning about parsing
(another petty matter: microkernels)
 
I know nothing about that.
All I'm saying is in void func(T a), T is basically useless.
It can be T and it can be null.
 
:grab popcorn:
 
Why doesn't java get get/set methods? Is that a proper question?
 
void func(@Nonnull T a)
 
6:55 PM
Didn't we just hop off that topic?
 
Well ok, maybe not useless, because you can't have any other type.
 
I'm going to sleep, @fge please ping me to trash the rest of the discussion when you're done :)
 
Something that allows type inference:

private int age;

public get age() {
return age;
}

public set age(a) {

}
 
But there's an unnecessary null possibility that is often not even checked.
 
cmon, who doesnt think thats awesome
 
6:56 PM
@VinceEmigh Just make age public, no?
 
Jeffery, would you rather get a NPE or a logical error?
 
@fge Actually, it is a standard library type which is defined like this: data Maybe a = Just a | Nothing
 
the setter allows for argument control
to ensure you cant go over/under a certain amount (throw IllegalArgumentException)
 
@VinceEmigh What's the different with a simple public attribute?
 
@Jefffrey You break encapsulation?
 
6:58 PM
If you wanted to prevebt age from being set to 200
 
@ZouZou How so?
 
@Jefffrey myObject.age = -1;
 
You don't get encapsulation anyway.
You allow for any modification and any access with trivial getters and setters.
 
im not saying trivial
 
@Jefffrey Biut you can check the parameter value in the setter
 
6:59 PM
@ZouZou Then it becomes a non-trivial setter.
 
im not a fan of setters in the first place. i believe behavior methods should be used to modify all state
but they're needed to add limitations
 
fge
@VinceEmigh just use builders then
 

« first day (1527 days earlier)      last day (3408 days later) »