Click here to Skip to main content
15,891,184 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
RantJava - ughhh Pin
ZurdoDev6-Nov-19 9:03
professionalZurdoDev6-Nov-19 9:03 
GeneralRe: Java - ughhh Pin
Slacker0076-Nov-19 9:26
professionalSlacker0076-Nov-19 9:26 
GeneralRe: Java - ughhh PinPopular
ZurdoDev6-Nov-19 9:35
professionalZurdoDev6-Nov-19 9:35 
GeneralRe: Java - ughhh Pin
Slacker0076-Nov-19 9:41
professionalSlacker0076-Nov-19 9:41 
AnswerRe: Java - ughhh Pin
Dan Neely7-Nov-19 3:28
Dan Neely7-Nov-19 3:28 
GeneralRe: Java - ughhh Pin
jackbrownii7-Nov-19 6:46
professionaljackbrownii7-Nov-19 6:46 
GeneralRe: Java - ughhh Pin
Marc Clifton6-Nov-19 9:29
mvaMarc Clifton6-Nov-19 9:29 
GeneralRe: Java - ughhh Pin
kalberts6-Nov-19 22:33
kalberts6-Nov-19 22:33 
I like that argument: If it had been missing from C#, C# wouldn't have been any better - so why complain about Java?

That's how I read what you are saying. I guess I am misreading it.

Then, I am dissatisfied even with the operator overlading in both C# and most other languages offering it, because I for several years was programming in a proprietary systems language ("Planc") that did it so much better:

Any operator is just a predefined function. A function name may have the familiar alpbetic-alphanumerics syntax, or a sequence of operator characters like +-=/*... Any function may be overloaded. Any function has 0 or 1 left side argument, and 0 or more right side arguments - with a single right side argument, enclosing parentheses are optional. The predefined functions may be redefined. Then you need no special "operator" concept.

You can define a function like ** (usually for power functions), or a FlipBitNumber operator (newValue = OldValue FlipBitNumber 5;). If you prefer an "operator-looking" name you might rather name it e.g. |^|. The only syntactic limitation is that two adjacent function/operator names of the same group (alphanum or special character) must be separated by a space.

The language didn't have garbare collection, so for development/debugging purposes I redefined the assignment operator for all pointer types to a function that decremented the reference count of the object the pointer was moved away from, and incremented the count in the object it was moved to. If the count of the old object went to zero, a memory leak exception was raised. If an object was free'd with a reference count >1, a dangling pointer exception was raised. I caught quite a few memory errors that way. Then for production code, I could just leave out from the build the file with the (re)definitions of the assignment operator, and the code would run at top speed.

When you have had that kind of flexibility available for a few years, you certainly won't be truly satisfied with C#.
GeneralRe: Java - ughhh Pin
Marc Clifton7-Nov-19 2:25
mvaMarc Clifton7-Nov-19 2:25 
GeneralRe: Java - ughhh Pin
kalberts7-Nov-19 21:36
kalberts7-Nov-19 21:36 
GeneralRe: Java - ughhh Pin
Dave Kreskowiak6-Nov-19 9:42
mveDave Kreskowiak6-Nov-19 9:42 
GeneralRe: Java - ughhh Pin
Super Lloyd6-Nov-19 11:55
Super Lloyd6-Nov-19 11:55 
GeneralRe: Java - ughhh Pin
CPallini6-Nov-19 20:57
mveCPallini6-Nov-19 20:57 
GeneralRe: Java - ughhh Pin
kalberts6-Nov-19 22:34
kalberts6-Nov-19 22:34 
GeneralRe: Java - ughhh Pin
Rajesh R Subramanian7-Nov-19 1:17
professionalRajesh R Subramanian7-Nov-19 1:17 
GeneralRe: Java - ughhh Pin
CPallini7-Nov-19 1:42
mveCPallini7-Nov-19 1:42 
GeneralRe: Java - ughhh Pin
Rajesh R Subramanian7-Nov-19 13:51
professionalRajesh R Subramanian7-Nov-19 13:51 
GeneralJust Curious Pin
Kevin Marois6-Nov-19 6:19
professionalKevin Marois6-Nov-19 6:19 
GeneralRe: Just Curious Pin
OriginalGriff6-Nov-19 6:31
mveOriginalGriff6-Nov-19 6:31 
GeneralRe: Just Curious Pin
Marc Clifton6-Nov-19 6:44
mvaMarc Clifton6-Nov-19 6:44 
GeneralRe: Just Curious Pin
agolddog7-Nov-19 3:22
agolddog7-Nov-19 3:22 
GeneralRe: Just Curious Pin
devenv.exe6-Nov-19 6:46
professionaldevenv.exe6-Nov-19 6:46 
GeneralRe: Just Curious Pin
User 99160806-Nov-19 6:54
professionalUser 99160806-Nov-19 6:54 
GeneralRe: Just Curious Pin
Kevin Marois6-Nov-19 7:02
professionalKevin Marois6-Nov-19 7:02 
GeneralRe: Just Curious Pin
Slacker0076-Nov-19 7:04
professionalSlacker0076-Nov-19 7:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.