« first day (91 days earlier)      last day (802 days later) » 

user142019
2:41 AM
This is not the room you are looking for.
 
5:29 AM
0
Q: slf4j logger singleton issue

MiteshI want to do logging using slf4j. I write my own logger class public class GlobalLogger { private static final Logger logger = LoggerFactory.getLogger(GlobalLogger.class); public static void logApplicationLog(String message) { logger.info("[" + APPLICATION_LOG + "]" + message); } ...

 
 
11 hours later…
4:24 PM
ASDASFEGEFR
 
4:34 PM
0
Q: singleton nasty object , unable to use other objects

SafyI'm trying to use singleton design pattern to create object and use it first i have the system class [ the factory ] object system class class system { public function require_($file) { if( file_exists($file) ){ require( $file ) ; }else{...

 
 
2 hours later…
6:49 PM
@rightfold Today I wanted to replace a bunch of int x, int y parameters with a Pos type in Java. All of a sudden, I had to deal with plus instead of +, possible null values and boxing. In C#, I would just use a struct and be done with it.
Oh wait, the boxing would also be there in C#. Well, in C++ it wouldn't :)
 
user142019
@FredOverflow Also operator overloading. :D
 
@rightfold What do you mean, can I not overload operators for structs in C#?
 
user142019
In C# boxing is implicitly done when you upcast a value type to object.
 
user142019
@FredOverflow Of course you can.
 
List<Pos> would use boxing, right? How about Pos[]?
 
user142019
6:51 PM
Yes. No. I don't know.
 
user142019
The JIT-compiler will most likely optimize out the boxing.
 
user142019
Since List<T> is implemented in terms of T[].
 
user142019
It would be an enormous waste to use object[] LOL JAVA.
 
I just asked in the C# room. Hint: this is not trolling, please don't delete it :)
 
user142019
@FredOverflow For generics, the JIT-compiler will generate the code at class load time.
 
user142019
6:55 PM
In Java that is impossible because generics are type-erased.
 
@rightfold Are you implying that Java sucks?
 
user142019
Yup.
 
user142019
And type-erased generics are beyond retarded.
 
@rightfold Well, they are an engineering trade-off. When you're used to C++ templates and C# generics, they sure suck.
 
user142019
7:14 PM
I just suck.
 
7:30 PM
2 messages moved to C#
 
7:45 PM
@rightfold Did you just try to implement it and fail? :)
 
user142019
No.
 
user142019
I'm writing a parser.
 
So why the move to the bin?
 
user142019
Because it's a stupid idea and humiliating.
 
user142019
I'm looking for interfaces, not type classes.
 

« first day (91 days earlier)      last day (802 days later) »