Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
එක පැකේජ් එකයි මාසෙටම Unlimited Internet. තාමත් DATA CARD දාන්න සල්ලි වියදම් කරනවද? අඩුම මිලට අපෙන්.
sayuru bandara
Updated:
Tuesday at 12:30 PM
Ad icon
ඉන්ටර්නෙට් එකෙන් හරියටම සල්ලි හොයන්න සහ Success වෙන්න කැමතිද? 🚀 (E-Money & Success Stories)
siri sumana
Updated:
Saturday at 11:44 PM
Gemini AI PRO 18 months Offer
Hawaka
Updated:
May 27, 2026
Ad icon
koko account
DasunEranga
Updated:
May 27, 2026
Ad icon
koko account
DasunEranga
Updated:
May 27, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
java da ? c# da ?
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="counter dr" data-source="post: 16372132" data-attributes="member: 385781"><p><span style="color: Blue">Java sucks because there are no "anonymous functions". To mimic this feature, Java has "anonymous classes". Oh, joy! I prefer currying, but even the basic function pointers/lambda expressions in C, C++, C#, Javascript and PHP are helpful from time to time. Javas "anonymous classes" are a woefully inadequate mimic because they require far too many redundant bytes of code.</span></p><p><span style="color: Blue"></span></p><p><span style="color: Blue">C and Java both suck because there's no type inference. Javascript and PHP both suck because they have very weak type safety, which sometimes makes helping a newbie with messy code a much more onerous task than it should be. Despite having a similar type safety to Java, C++ and C# both have a basic type inference. Programming languages that implement currying tend to also implement fairly decent type inference.</span></p><p><span style="color: Blue"></span></p><p><span style="color: Blue">Error handling sucks in Java. Exceptions are thrown for a number of things ranging from the non-recoverable (eg. IndexOutOfBoundsException, etc) to the recoverable (eg. the Scanner.next family throwing NoSuchElementException and IllegalStateException), but teachers continue to perpetuate this inconsistent madness. Classes that don't throw these exceptions such as FileInputStream do exist, but don't have the same functionality, so the teachers don't teach them; FileInputStream.read() returns a negative value when EOF occurs. try/catch blocks aren't just cumbersome because they're redundant bytes of code; They also cause optimisation to become more difficult in certain circumstances. Error handling is better in C, C++ and C# which tend to indicate recoverable errors by return values and non-recoverable errors by exceptions, even in their exceptionally good IO format functions. </span></p><p><span style="color: Blue"></span></p><p><span style="color: Blue">EVERYTHING SUCKS in PHP, because PHP is defined by the reference implementation at php.net. The interpreter that defines the language is written in C code that relies upon implementation defined and potentially undefined behaviour. You may get a subtly different interpreter program compiled depending upon the configuration and version info of your OS, compiler, standard library, etc... with a subtly different behaviour.</span></p><p><span style="color: Blue"></span></p><p><span style="color: Blue">There's no pass-by-reference in Java! Don't confuse "pass-by-reference" and "reference types". All of the above languages have "reference types".</span></p><p><span style="color: Blue"></span></p><p><span style="color: Blue">Java implements garbage collection inefficiently, as most do. Good quality garbage collection accept a hint so it doesn't end up thrashed. GC thrashing is a multithreading bottleneck. C and C++ programs can use garbage collection, if only as third party libraries, but that doesn't seem to be too helpful when I consider coverage/memory leak tools such as valgrind.</span></p><p><span style="color: Blue"></span></p><p><span style="color: Blue">The Java GC implementation caused a "feature" known as object resurrection. When a finalizer is called, the object can prevent the GC from reclaiming it. What purpose could this have? Well, the object can then be used by the program, because it's still in existence. However, a finalizer for an object only ever gets called once, so an object that's been resurrected can't be reclaimed by the GC. Memory leaks? I thought Java was "safe"! Speaking of safety, do you know how many lines it takes to cause the expression 1+1==2 to evaluate to false in Java? Twenty-three.</span></p><p><a href="http://tnbforum.com/viewtopic.php?f=52&t=47621" target="_blank">http://tnbforum.com/viewtopic.php?f=52&t=47621</a></p></blockquote><p></p>
[QUOTE="counter dr, post: 16372132, member: 385781"] [COLOR=Blue]Java sucks because there are no "anonymous functions". To mimic this feature, Java has "anonymous classes". Oh, joy! I prefer currying, but even the basic function pointers/lambda expressions in C, C++, C#, Javascript and PHP are helpful from time to time. Javas "anonymous classes" are a woefully inadequate mimic because they require far too many redundant bytes of code. C and Java both suck because there's no type inference. Javascript and PHP both suck because they have very weak type safety, which sometimes makes helping a newbie with messy code a much more onerous task than it should be. Despite having a similar type safety to Java, C++ and C# both have a basic type inference. Programming languages that implement currying tend to also implement fairly decent type inference. Error handling sucks in Java. Exceptions are thrown for a number of things ranging from the non-recoverable (eg. IndexOutOfBoundsException, etc) to the recoverable (eg. the Scanner.next family throwing NoSuchElementException and IllegalStateException), but teachers continue to perpetuate this inconsistent madness. Classes that don't throw these exceptions such as FileInputStream do exist, but don't have the same functionality, so the teachers don't teach them; FileInputStream.read() returns a negative value when EOF occurs. try/catch blocks aren't just cumbersome because they're redundant bytes of code; They also cause optimisation to become more difficult in certain circumstances. Error handling is better in C, C++ and C# which tend to indicate recoverable errors by return values and non-recoverable errors by exceptions, even in their exceptionally good IO format functions. EVERYTHING SUCKS in PHP, because PHP is defined by the reference implementation at php.net. The interpreter that defines the language is written in C code that relies upon implementation defined and potentially undefined behaviour. You may get a subtly different interpreter program compiled depending upon the configuration and version info of your OS, compiler, standard library, etc... with a subtly different behaviour. There's no pass-by-reference in Java! Don't confuse "pass-by-reference" and "reference types". All of the above languages have "reference types". Java implements garbage collection inefficiently, as most do. Good quality garbage collection accept a hint so it doesn't end up thrashed. GC thrashing is a multithreading bottleneck. C and C++ programs can use garbage collection, if only as third party libraries, but that doesn't seem to be too helpful when I consider coverage/memory leak tools such as valgrind. The Java GC implementation caused a "feature" known as object resurrection. When a finalizer is called, the object can prevent the GC from reclaiming it. What purpose could this have? Well, the object can then be used by the program, because it's still in existence. However, a finalizer for an object only ever gets called once, so an object that's been resurrected can't be reclaimed by the GC. Memory leaks? I thought Java was "safe"! Speaking of safety, do you know how many lines it takes to cause the expression 1+1==2 to evaluate to false in Java? Twenty-three.[/COLOR] [url]http://tnbforum.com/viewtopic.php?f=52&t=47621[/url] [/QUOTE]
Insert quotes…
Verification
Haya warak paha keeyada? (haya wadi kireema paha)
Post reply
Top
Bottom