[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Before I started learning Java, I laughed at /g/ for bashing
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 195
Thread images: 19
File: 1449730312438.jpg (221 KB, 1024x768) Image search: [Google]
1449730312438.jpg
221 KB, 1024x768
Before I started learning Java, I laughed at /g/ for bashing it. But holy fuck, it is the worst shit I've tried to code.
When were you when you realized that /g/ was right again?
>>
how could you dismiss a group of people making fun of something without knowing anything about it yourself?
>>
>>53586742
because this place is full of contrarians
>>
Personally I like Java but not everyone does.

Why don't you stop listening to /g/ shills and actually form your own opinion on something for once.
>>
Why learn Java? If people stopped doing that it would eventually disappear.
>>
Java is fine, some Java libraries have horribly verbose API, but that's the problem with the library developers, not the language.
>>
Java's a pretty good language.
>>
Why would you hate Java? What's wrong with it? I have coded in Java, C#, PHP, Ruby and i like Java the most.
>>
Does C# have objects like java where you have to close/dispose the object after using it?
>>
File: 1453893374327.jpg (93 KB, 400x394) Image search: [Google]
1453893374327.jpg
93 KB, 400x394
>>53586778

Stay mad pleb. Verbose methods for life nigger.
>>
>>53586798
>calls me a pleb
>posts that picture
>calls me a nigger
Right.
>>
Oh, it's not the worst.
Have you tried PHP yet? It's like a parody of C, Perl and Java. An esoteric programming language that people accidentally took seriously.
>>
File: 1427130497372.jpg (136 KB, 571x635) Image search: [Google]
1427130497372.jpg
136 KB, 571x635
>>53586711
>/g/
>right about anything
/g/ is a massive circlejerk and it seems you've just kissed our collective neckbeard ass.
>>
>>53586711
What's wrong with Java?

The Java browser plugin is awful, but it's deprecated and not included anymore in Java distributions

Other than that the Java platform is excellent
>>
the OOP paradigm is fucking bullshit and retarded, you don't have to be genius to understand that
there is plenty of ressources about that if you'd like to search.
A fully object-oriented language can't be good.
also:
A small OS(jvm or whatever) inside an OS! What the hell is wrong with these guys...
>Muh portability!
Bullshit again a big project is very unlikely to be easy to port to another architecture.

Sadly java is everywhere in the workplaces atleast where I live.
>>
testing 4chan
>>
>>53586893
OOP is a tool to achieve your task. If you're not a baby you'll have no problem using it.

VM is not an OS.

Portability is there, just because you fucked it up does not mean the system is flawed.
>>
File: girl_in_rain-1920x1080.jpg (465 KB, 1920x1080) Image search: [Google]
girl_in_rain-1920x1080.jpg
465 KB, 1920x1080
hduodjowd
>>
File: barborous.png (67 KB, 133x287) Image search: [Google]
barborous.png
67 KB, 133x287
>>53586893
>A fully object-oriented language can't be good.
Why? You can write shit entirely procedurally, but will the fact that the code has to be encapsulated in a class trigger your autismo?
>A small OS(jvm or whatever) inside an OS
Lol. Definitely troll. Jewish triqs detected. A JVM is an interpreter for java bytecode not an OS you fucking pleb. Also, with JIT compilation, java bytecode is pre-compiled and not interpreted.
>>
>>53586797
Yes, some objects need to be disposed, e.g. streams.
In C# this is often done using the using statement.
>>
>>53586821
no operator overloads
>>
>>53586893
>first lang was Python
>moved to C#
>got into cs meme degree
>got into the MEAN stack an javashit general idea on the side, created few sites with semantic and bootstrap etc.
>>now learning Java for the rest of the semester
> having no problem whatsoever with any of the languages and I understand that some are good for something and other for something else
>Wanting to learn C++ for the sake of OpenCV and some personal projects

So next year I will be able to choose from Java, C++, C# or javascript (and all the pop frameworks with it) to learn, the context of the lectures are the same but the homeworks and projects will be specific with the lang you choose.

And eventually I might choose one main lang and get good at it and hopefully find a job.

Any recommendation from the above list ?
I really dont hate/love any of those, as long as its useful I like it.

On topic, I find java really easy to use, especially with all the docs and info on the web.
>>
>>53586989
>Any recommendation from the above list ?

Not on the list, but you could try looking into Scala in addition to those. Not for commercial purposes, but because it's incredibly fun. I've tried a lot of languages and there's always been some element that I didn't agree with, but with Scala I just clicked instantly. It's like somebody took the good things of all the languages I tried so far and combined them into one, getting every detail just right. Sadly it doesn't seem to see that much use professionally...
>>
>>53586821
String s1 = "op is fag" 

What does that line do? Well the "op is fag" is actually an implicit call to a String constructor.
String s2 = new String(s1)

This line makes a copy of the previous string and creates a new object for it.

String s3 = new String("op is fag")

This is where it gets stupid, the double quotes in itself is a new string constructor, but since you're calling that inside a constructor the original string object created has nothing pointing to it and is lost.

Why does this matter? Java is garbage collected, right? Yes, but when new objects get created they get put in eden. The JVM doesn't clear eden until it has no more room to allocate new objects. Silly things like that will fill eden with garbage, and since garbage collection is expensive it'll probably make your code hiccup when the GC has to run.

Java should support primitive data types.
>>
>>53586797
Do you mean the garbage collection?
>>
>>53587244
In which language is a string a primitive datatype?
>>
why, python of course! I don't have to call a constructor or anything
>>
I want to learn React. Should I learn ES6 now?
>>
Not in this year
>>
>>53587244
>Silly things like that will fill eden with garbage, and since garbage collection is expensive it'll probably make your code hiccup when the GC has to run.

If that really is a problem, you can just run the GC periodically in a separate Thread.
>>
>>53586938
To be fair, that is a deal breaker. Although, most of the time, people overuse the living shit out of them anyway. It's rare I see them used effectively.

Java isn't a bad language, at all.
>>
>>53586989
>Any recommendation from the above list
just follow the herd lurching at the latest silver bullet, and circle jerk it on the forums
>>
>>53587370
is this a response to >>53587345
?
>>
>>53587244
>Java should support primitive data types.
Do you have any clue what you're talking about?
>>
>>53587244

There are much better ways to handle strings in Java. Once you realize that String is an object, that becomes immediately apparent. The problem is that you are treating it as a primitive when it isn't one.
>>
>>53586893
>the OOP paradigm is fucking bullshit and retarded
yep, it's for plebs that can't understand what's going on under the hood and need to abstract that shit away
>>
>>53587345
oups I thought this was the /wdg/ thread
>>
>>53587345
Yea you should know ES6. Check out Babel
>>
>>53587310
C#?
>>
>>53586786
No wonder, C#, PHP and Ruby are a lot shittier
>>
>>53587443
Definitely not
>>
>>53586711
The main thing that I didn't like about it that it's strictly oop
>>
>>53587465
Wat.
>>
Java can often be fucking great. It's the fastest non-native and garbage collected language out there, only beaten in speed by C, C++ and Rust, which are all native and you have to manage memory yourself.

If you avoid the "Enterprise" shit that the Java community has shat out, it's a great platform to develop for. Check this REST one liner from Rapidoid
On.get("/size").json("msg", msg -> msg.length());

This framework also happens to be the fastest web framework in the world coincidentally (see pic). Elegant and fast.
>>
>>53586923
OOP is a tool right but a bad one, doing dogshit in java is easy.
like php or javascript, it looks like a language designed for retards who can't do shit in C so they can
actually do "work" and no killing themselves because of their retardness.
>>
>>53587516
Where's Warp on that list?

It would probably beat them all.
>>
>>53587604
>implying C is hard
>>
>>53587623
Link? I can't find anything about Warp on Google
>>
Can someone explain me what's wrong with Java? I just started it (I have to..)
>>
>>53587665
Nothing, carry on
>>
>>53587516
I wonder what would be the best way of benching this against rapidoid

{-# LANGUAGE OverloadedStrings #-}
import Web.Scotty
import qualified Data.Text as T

main = scotty 8080 $ do
get "/size" $ param "msg" >>= json . T.length
>>
>>53587650
https://hackage.haskell.org/package/warp

Read up on some of its design here: http://www.aosabook.org/en/posa/warp.html (somewhat outdated but still a good read)
>>
The jvm is developed in C
C > java
never learn this piece of crap that is java.
>>
>>53587604
I don't even know if you're trolling because people actually think like this. 4chan and the internet as it is wouldn't exist if high level programming languages didn't exist. People want to get stuff done, business want to make money, and high level programming does it faster and easier.
>>
>>53587516
You don't have to manage memory yourself in rust.
>>
>>53587706
C is a high level programming language
>>
>>53587706
You see, the reason make fun of Java fags is because they _genuinely_ believe that OOP is the pinnacle of high-level abstraction.

Java is barely a step above C. Try programming in Haskell for a year and then go back and compare it against your Java experience.
>>
>>53587665
Not much. Most of this thread is C elitists and clowns who actually haven't used Java. Object handling can occasionally be funny if you don't know what's happening in the backend. Garbage collection time can be an issue if you have HUGE amounts of data, although if you're doing that you can often set the GC to collect more aggressively.
>>
>>53587706
joking bro I know java is widely used i use it too
>>
>>53587779
Thanks
>>
>>53587754
People don't believe it's a pinnacle. People believe it gets the job done. What have you written in Haskell. Show us.
>>
>>53587754
I'll actually try Haskell. I'm messing around with a friend, we're gunna write the Game of Life and maybe some other trivial program in as many languages as we can be arsed to set up environments for. I'll put Haskell on the list.
>>
>>53587754
Functional programming is a meme. Even making a simple Pacman game is a major pain in the ass.

http://prog21.dadgum.com/23.html
>>
>>53587516
> rust
> manage memory yourself
what?
>>
>>53587676
>>53587676
I doubt these are faster. If you want you can submit a pull request and upload them to the benchmark to be tested for Round 13

https://github.com/TechEmpower/FrameworkBenchmarks/tree/master/frameworks
>>
>>53587818
Pure functional programming sucks, but as part of a multi-paradigm language, functional programming is pretty great.
>>
>>53587808
Some people actually do. They probably read some statements from the late 90s when OOP was advertised as the future and best way to do things.
>>
>>53587887
So fucking let them. OOP is good. Better than the mess Haskell people are pushing, that's for sure. What have you written in Haskell again?
>>
>>53587881
And as of JDK 8 Java includes functional programming as Streams (which look great but are often slower).
>>
>>53586932
Java is interpreted too, there's a virtual machine running the code, just because its pre optimized and optimized on run time doesn't mean it run on machine code directly. Java is shit, you can use python for easiness or C for performance. You don't need any other language.
>>
>>53587938
Or you can just learn Java which has just about the performance 99% of people need without dealing with C.
>>
>>53587938
That's what he said
>A JVM is an interpreter for java bytecode

However,
>with JIT compilation, java bytecode is pre-compiled and not interpreted

is also an option.
>>
>>53587938
You are misinformed. Java bytecode is compiled to machine code and is executed on the processor directly.
>>
>>53587938
>You don't need any other language.
You also don't need dozens of different distros, but it's fun to have choice.
>>
>>53586893
So you are against interpreted languages. What languages do you use ?
>>
>>53586893
>Doesn't support interpreted languages
>Uses python
>Uses C when he needs to optimise his Hello World code.
>>
>>53587915
>And as of JDK 8 Java includes functional programming as Streams

I agree that Java 8 has been a great step for the language. Much greater than when they introduced generics for example. I like Java a lot, but I also don't want to talk down its shortcomings: Functional programming in Java 8 still feels very much done "the Java way": Overly verbose if you want to do anything more than the simplest of tasks. That's why I like Scala so much, it has tons of syntactic sugar for almost everything and it's so flexible that you can make everything very concise on your own if it isn't already.
I really hope Java goes a little bit more in that direction in the future. Having a actual multi-inheritance system that's more than just interfaces with default methods would move Java forwards by a large amount, or maybe something similar to Scala's traits / mixins.


(which look great but are often slower).

I don't really see that as a problem. I'm not really a guy that doesn't care for resources / optimization, but a few percent slower performance or higher memory footprint wouldn't bother me all too much in most cases, if the code actually becomes more concise and maintainable. Which it does at lot when you compare Java 7 code to Java 8 code.
>>
Will i like java coming from C++? Im taking a java course next semester
>>
>>53587816
Note: It's not a good idea to just try and port a program to Haskell to get a feel for the language, since it's architecturally different from most conventional languages in a deep-seated way that requires years for somebody to fully master.

So whatever experience you are going to get out of trying to port game of life (or whatever) to Haskell is probably going to be unsatisfying.
>>
>>53588272
well fug that but I'm gunna try anyway
>>
>>53586711
Java like all programming languages has its ups and downs.

Java is a mess, but also does inheritance and datastructs in a very clean and nice manner, so it runs on everything.
>>
>>53588218
I'm working on a Java library and I've been benchmarking it.
Using lambdas and forEach instead of a traditional for loop will give you a 200ms overhead. I'm sure as the JVM warms up the gap shortens by quite a margin but still that's pretty unacceptable for performance dependant stuff.
>>
>>53588309
delay*
>>
>>53588227
You'll like some things more and some less, I guess. I'm not too deep into C++ but from what I've seen, they're not all too different. Java has no true multiple inheritance but (IMO) a better standard library and better compiler errors. Also you have a lot less ways to fuck up, but you give up some control in return. I don't know if C++ supports functional-style programming, but Java does (although that was tacked on in a later version, and it kinda shows).
>>
>>53587465
gtfo....
>>
I like Java, but OOP introduces a lot unnecessary complexity most of the time and is very difficult to design right. just see how much cleaner and easier to use is the Java 7 Files class compared to the old API and it consists only of functions without any OOP whatsoever
>>
>>53587862
Looks like they already have a couple of interesting Haskell-related servers slated for the next version of the benchmark.
>>
>>53587754
>Haskell
Fell for the meme.
>>
>>53588309
>Using lambdas and forEach instead of a traditional for loop will give you a 200ms overhead.

That's interesting, could you elaborate on what the benchmark is exactly and when the overhead occurs? What does the loop actually do when you compare it to a forEach? Is it a 200ms overhead of a single forEach call over a single for-iteration over the same collection? Do you use counting or foreach-style (Type t : collection) for-loops for the comparison?

>I'm sure as the JVM warms up the gap shortens by quite a margin but still that's pretty unacceptable for performance dependant stuff.

At least in the scientific community, nobody benchmarks without significant warmup. Benchmarks without any warmup mean nothing, the speed differences can be multiple orders of magnitude for a method that has not been invoked before or has been invoked three or five times in a warmup.
>>
>>53586711
Switch languages and enjoy your unemployability.
http://www.codingdojo.com/blog/9-most-in-demand-programming-languages-of-2016/

No one uses Haskell, and C is only used in lower level programming. You don't program business applications in C.
>>
>>53586778
Java it self is verbose as fuck and verbosity is a non issue.

Some of the real reasons why java sucks are how shitty the GCs are, Exceptions are a god damn mess among many others.
>>
>>53588484
>how shitty the GCs are

What specific behavior of the GC do you deem "shitty"?

>Exceptions are a god damn mess
Assuming you mean checked exceptions, if you want a job done quick-and-dirty, sure they are shit. In production, a lot of the checked exceptions (I/O most of all) actually would have to be caught either way. By the way, if you want you can greatly reduce the boilerplate required for checked exceptions since Java 8 by writing a helper function or two that execute code in a functional interface and return the result, then hide any checked exceptions by encapsulating them in RuntimeExceptions.
>>
>>53588406
Why are you replying without giving any arguments fucking nigger. Java doesn't have have the procedural of functional paradigms. It's just imperative oop so it's fucking nothing. You have to create a fucking class to write hello world
>>
>>53588587
There are only a handful of non-oop languages, they aren't as commonly used because they aren't oop.
>>
>>53588420
It does have OOP.
>>
>>53588587
Class is a basic building block in Java so it makes sense.
>>
>>53588569
>What specific behavior of the GC do you deem "shitty"?
Not properly working most of the time and being slower than snails when they do
>>
JAVA is outdated. Ruby on rails is much better.
>>
>>53588587
Maybe read up on the language before you shit on it.

>>53588635
>Not properly working most of the time
That's interesting, can you give an example of where it fails? I've not personally run into any problems that were caused by the GC not working correctly, nor do I know anyone that has.

> and being slower than snails when they do
Last time I had to profile a few Java programs it did pretty OK actually
>>
>>53588740
>Ruby on rails

Anon, better refresh the pink dye on your beard before it fades out. Also did I hear your doorbell ring? Must be Tyrone, so you better hurry up and prep him before your wife gets mad.
>>
>>53588775
But RoR allows you to build an application blazing fast, and you don't even have much code to type since a lot of standard things are carried out automatically.

And there is gems for everything, you'll always find a library to handle many things for you.
>>
File: 1375030354258.jpg (29 KB, 535x483) Image search: [Google]
1375030354258.jpg
29 KB, 535x483
>>53588741
I studied it in uni so I can shit on it
>>53588629
Well that's why I said I didn't like it
>>
>>53588741
Memory often isn't freed, i've seen that happen many times other issue that seems to have been solved (haven't seen it for a very long time now) was that compacting memory would not happen.

>Last time I had to profile a few Java programs it did pretty OK actually
Last time i bothered to check it it would take its sweet time, go do see it is improving though
>>
File: csdegree.png (116 KB, 1515x663) Image search: [Google]
csdegree.png
116 KB, 1515x663
>>53588839
CS degree
>>
>>53588839
>Well that's why I said I didn't like it
Well that's why you'll have a hard time finding a job.
>>
>>53588272
>>53588294
I-I'll give it a try myself, I have to see how minimal I can get it
>>
>>53588819
yeah but interpreted languages like Ruby are slow as fuck compared to Java
>>
>>53588839
>I studied it in uni so I can shit on it
You didn't "study it", you took an entry level course because it was required by your program. Otherwise you'd know that Java has been supporting functional programming since 2014 (although admittedly not as good as primarily functional languages)
>>
>>53587244
> Java should support primitive data types.

What? You are a retard
>>
>>53588892
>Memory often isn't freed, i've seen that happen many times
Now I'm genuinely interested. Which VM are you using? Most implementations intentionally don't discard every object on every GC run, though what you're saying sounds a lot more severe.

As for the performance, I don't have any number available on the machine I'm on right now, but if I remember correctly, it took less than five seconds to free 5-6 GiB worth of objects after a computation, which I'd call reasonably fast. Although I'd guess the data structures used in the program matter quite a lot. Also the program is designed to not produce a lot of garbage while the actual computation is running (it's not using the standard library).
>>
>>53588933
That's in what version? 9? How many people use it?
> although admittedly not as good as primarily functional languages
So it's still shitty
>>53588893
Stay mad neet
>>53588910
Maybe I already have a job?
>>
>>53588839
basically: babby had to use java when taking an entry course in cs and hates it because it's popular. got it
>>
>>53589193
this
>>
>>53589110
>That's in what version? 9? How many people use it?

Nope, Java 8. I don't have any numbers about how widely it's been adopted unfortunately, but I use it and the people I work with use it, and that's all I care about.

>>53589110
>So it's still shitty
I'd say it's still better than Python's take on functional programming, and it doesn't support syntactic sugar for currying. That's irrelevant though, as your claim was that Java did not support functional programming, which is still wrong. The quality of the implementation has nothing to do with your initial claim.
>>
>>53589193
this
>>
>>53589068
Oracle JVM.
>>
>>53588420
I felt the same way you do about OOP when I was a young padawan, but then I understood it. And understanding it takes more than just learning the theory, it requires a radical change in the way of thinking which comes with time, experience and quite a lot of intellectual effort if you're coming from the procedural paradigm.

What most "muh C" faggots fail to understand is that not only is abstraction good, it's necessary at some point of business logic complexity, or you end up with unmaintanable pile of spaghetti that noone can comprehend. The key thing, however, is using the right amount of abstraction. Have too little and you end up with a weird OO-procedural mix that's usually the worst of both worlds. Have too much and you get an overengineered, overcomplicated mudball using every single design pattern ever invented just for the sake of it. What separates programmers from code monkeys is knowing where the sweet spot between those two is for a particular project.
>>
>>53588294
>>53588915
I tried

{-# LANGUAGE DeriveFunctor, TemplateHaskell, RankNTypes, NoMonomorphismRestriction #-}

import Control.Applicative
import Control.Comonad
import Control.Lens
import qualified Data.List.Zipper as LZ

-- Helper: Generalization of list zippers to a two-dimensional zipper plane
newtype Z a = Z (LZ.Zipper (LZ.Zipper a)) deriving (Show, Functor, Eq)
makePrisms ''Z

instance Comonad Z where
extract = LZ.extractz . LZ.extractz . view _Z
duplicate = over _Z $ LZ.duplicatez . fmap (review _Z . LZ.duplicatez)

right, left, up, down :: Iso' (Z a) (Z a)
right = wrap _Z $ iso LZ.right LZ.left
up = wrap _Z.mapping $ iso LZ.right LZ.left
left = from right
down = from up

-- 'Wraps' an automorphic lenslike in an isomorphism
wrap p i = cloneIso p . i . from p

focus :: Lens' (Z a) a
focus = _Z.cursor.cursor
where cursor f lz = f (LZ.cursor lz) <&> \x -> LZ.replace x lz

-- Actual game of life
neighbours = mconcat cells . focus
where cells = horiz ++ vert ++ liftA2 (.) horiz vert
horiz = [right, left]
vert = [up, down]

rule :: Z Bool -> Bool
rule z = case lengthOf (neighbours.only True) z of
2 -> extract z
3 -> True
_ -> False

step :: Z Bool -> Z Bool
step = extend rule


The part I'm unhappiest with is the generalization of zippers to 2D planes. It feels like that should be easier, like the composition of two existing comonads or something.

I'd also like to try generalizing it to indexed stores instead and using a Data.Array or something. This one works on infinite planes but it's also quite inefficient.
>>
>>53588614
I only mean this particular class, I know has to interact with a lot of OOP code. the class is there, because the compiler demands it, but it's basically just a namespace
>>
>>53587676
where do you learn this shit?
whats scotty?
etc.
>>
Once you understand what an object is, Java is superb and everything makes sense.

You probably just need more time to get used to OOP.
>>
>>53590254
Some dead web framework for haskell.
>>
>>53590377
I assume you're >>53589609
i know about applicatives, monoids, standard Data.List, Data.Map, Data.Char System.IO, System.Directory
somebody told me to get acquantanced with standard libs
are zippers, comonads, and lens the rest, or is there other modules
also, what is that at the top with
{-# LANGUAGE
>>
>>53587456
Name something better please.
>>
>>53590437
They implement optional language features.
>>
4chan connect if with else :>

if (a>1) if (a<10) m–=2; else if (a==10); else m+=2; else if (!a); else m=0;
>>
>>53586820
>/g/ is a massive circlejerk
It's anything but
>>
File: man abs carmack.png (326 KB, 558x691) Image search: [Google]
man abs carmack.png
326 KB, 558x691
>>53589609
http://blog.sigfpe.com/2006/12/evaluating-cellular-automata-is.html
>>
>>53590437
>are zippers, comonads, and lens the rest, or is there other modules
They're user-developed libraries. See https://hackage.haskell.org/

For a list of all the standard libraries (where standard means “built into Haskell”), see https://www.haskell.org/onlinereport/haskell2010/haskellpa2.html#x20-192000II

>also, what is that at the top with
language extensions, extensions that compiler may (or may not) implement in addition to what's required by the haskell report. See https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/ghc-language-features.html for an overview
>>
>>53586711
>I suck at programming so I bash the language rather than myself
Yeah, you'll fit in here well.
>>
I like JAVA.
>>
File: pic.jpg (107 KB, 1280x768) Image search: [Google]
pic.jpg
107 KB, 1280x768
Why Java have cup of tea logo within?
>>
>>53587665
Enterprise rubbish.

That and the tenancy for xml configuration over code
>>
>>53587396
>people overuse the living shit out of them anyway. It's rare I see them used effectively.
This is a meme. People say this all the time but I've never seen any examples of anyone abusing them. Ironically I can think of only one example of operator overload abuse and it's in the c++ STL library.

Anyway, should we take away the knives from a professional chef because some people cut their fingers with them?
>>
File: Ccv1o3vVIAAVnNW.jpg large.jpg (71 KB, 1024x573) Image search: [Google]
Ccv1o3vVIAAVnNW.jpg large.jpg
71 KB, 1024x573
>>53589599
>that not only is abstraction good
The only abstraction OOP gives is the one on the right.
>>
>>53586711
>>53586756

Took 2 semesters of it….torture chamber.
>>
>>53588587
Is Python OO for everything?
>>
>>53586711
Git gud
>>
File: 8d0.jpg (18 KB, 500x500) Image search: [Google]
8d0.jpg
18 KB, 500x500
>>53586711
>2016
>dumb fucks on /g/ not realizing they are posting in a troll thread
>>
>>53591312
Thx m8
>>
>>53595183
No
>>
File: 1439438116957.jpg (37 KB, 300x300) Image search: [Google]
1439438116957.jpg
37 KB, 300x300
>itt mad poorkids who I out-earn by writing enterprise level web applications that automate actual business processes.
Less talk more rock children
Get mad and stay mad
>>
>>53587665
http://steve-yegge.blogspot.fi/2006/03/execution-in-kingdom-of-nouns.html
>>
>>53594913
>being too retarded to understand OOP

Kek, OOP was invented to make coding easier. I don't understand how people have trouble with it.
>>
>>53595281
>all those buzzwords

Why should anyone chose Java over other stuff senpai?
>>
>But it is widely used
Yeah. And most software is fucking garbage. Most IT projects fail etc. The mode case does dog shit to guide you.
>>
File: 1436109962186.png (231 KB, 304x366) Image search: [Google]
1436109962186.png
231 KB, 304x366
>>53595316
>thinking I said any buzzwords
>confirmed poor
Not going to teach you how to google or get job experience freindo.
>>
>>53595315
https://www.youtube.com/watch?v=QM1iUe6IofM

Maybe if you do meme projects with objects like house cats and dogs. Most things don't neatly map into hierarchies.
>>
Java has great tools, but the language itself is rough and overly verbose(and encourages the verbosity.)
>>
>>53595430
confirmed ignorant
>>
>>53590641
C
>>
>Spend half your day figuring out how to best split your code in objects
>Next day decide it's all wrong and rewrite it again
>Encapsulate everything neatly
>Now try to find various ways and patterns to pass data between objects overcome my encapsulation
>Make a custom data type. It doesn't hold any though, only functions
>>
>>53595496
Just write C style code in C++.
You don't have to use OOP. I only use it for the quality of life improvements like parameter overloading, new instead of malloc, auto, ect...
>>
File: oop.png (313 KB, 1680x740) Image search: [Google]
oop.png
313 KB, 1680x740
>>53595315
>if you don't like Java then you are too stupid to understand OOP.

Class-based inheritance is dogshit that leads to brittle taxonomies that will inevitably fuck everything up for you. Prototypal inheritance is far more powerful and flexible and was one of the many gamechanging inventions to come out of Xerox PARC in the 1980s.

Of course you'd need a far better and more powerful language than Java to get to use advanced features like prototypes, but don't worry because Javascript is waiting for you for when you decide you want to upgrade to a big-boy language.
>>
>>53595974
>javascript
>big boy language

HAHAHAHAHAHAHAHAHAHAHAHAHAHA
>>
>>53595974
how literally retarded do you have to be to not understand inheritance? I understood it when I was 12, and I was (and still am) pretty stupid.
>>
File: 1455855418812.jpg (8 KB, 190x200) Image search: [Google]
1455855418812.jpg
8 KB, 190x200
>>53596417
>Java 8
>finally getting lambdas
>Javascript always had them

Carry on trying to make your language better by implementing features that Javascript already has.
>>
>>53596473
How stupid to you have to be to not understand his post?
It's not about not understanding inheritance. It's about inheritance being a very shit idea that doesn't actually make your code simpler despite it claiming to do so.
>>
>>53596526
that anon pretty much admitted to be really stupid on his own comment so i don't understand why you're asking that...
>>
File: 1458198225001.jpg (83 KB, 480x640) Image search: [Google]
1458198225001.jpg
83 KB, 480x640
>>53595974
There's nothing wrong with inheritance. It's people that use inheritance because they can, not because they need to.

They use abstract models that define a pattern, but never make use of that rigid definition in any way.

Example:
>I made an LeggedAnimal abstract class that enforces all animals have legs
Well what are you going to do with that information? Are you going to start subtracting legs if the animal misbehaves from the base class?
>No I just wanted to make sure all animals had legs
>>
>>53596552
Or you could just composition.
>>
>>53596552
that abstraction has a problem, not all animals have legs
>>
File: 1446697506915.jpg (36 KB, 286x429) Image search: [Google]
1446697506915.jpg
36 KB, 286x429
>>53586749
Like when you laughed at /g/ for bashing it automatically?
>>
>>53596611
All LeggedAnimals have legs tho
>>
>Hurr fucking Durr Jaba!!!

>Ebytings an objeckt but not ebyting!
>>
>>53586711
Python masterrace
>>
>>53587983
...as the software runs Java bytecode, it continually analyzes the program's performance for "hot spots" which are frequently or repeatedly executed. These are then targeted for optimization...
Both VMs compile only often-run methods, using a configurable invocation-count threshold to decide which methods to compile.
from https://en.wikipedia.org/wiki/HotSpot
so yeah, a lot of code is interpreted as well
>>
>>53588380
>(although that was tacked on in a later version, and it kinda shows).
desu C++ is full of that, there's all kinds of weird syntax because stuff was added later on
>>
>>53595446
>overly verbose
seriously the worst thing I can think of for java
>>
>>53596515
>likes javascript
>makes fun of any other programming language at all
>>
>>53586711
JVM IS A CLUSTERFUCK, JAVA U SAY? WELL IN JAVA WORLD MINECRAFT IS A TRIPLE A TITLE AND IT FUCKING LAGS. THOSE FUCKING CUBES LAG, CARL.ITS SHIT BY DESIGN TO SELL NEW HARDWARE TO THE ENTERPRISE, ORACLE IS BACKED UP BY CIA. JAVA DEVELOPERS ARE IMBECILES/XML RETARDS.
Case closed.
>>
>>53597523
That guy is right though. My job is in C, and I've also worked in Java, C#, and Javascript (and some lisp back at school) JavaScript is a fantastic freeing language. It's a great balance between imperative and functional. What's wrong with javascript?
>>
But is it worse than CPP?
>>
>>53598493
Dynamic typing combined with dumb coercion rules magnifies simple errors from typos that shouldn't compile in the first place.

Also having closures but no lexical scoping is retarded, although granted, like all of js's features it's due to be fixed in ECMAScript version 234957345897, due out any year now and sure to be fully implemented by every mainstream browser seven years afterward.
>>
>>53598510
C++ isn't a benchmark for shittiness and most of the people who treat it as such on here are memelords jerking off over minimalism and trying to emulate their UNIX heroes by worshiping C.
>>
Best thing about Java? You can develop GUI apps from your Linux or Mac machine while supporting Windows users. This means you can actually get paid while using your favorite OS. This has been true since the late 90's. This is partially why Linux has been so successful.
>>
>>53587754
Haskell is a meme language anon.
I love haskell but it's not a language for writing large scale serious projects in.
>>
Why did Javafags adopt JavaFX, /g/? Why didn't the brilliant light of Qt shine on Java as well through Jambi? What happened?
>>
>>53598576
>implying dynamic typing isn't a fucking massive time saver
>implying you aren't jelly of the js truthyness
keep comparing object to null you pleb
>>
>>53586797
It does GC works better than JVM bloated piece of shit
>>
>>53599250
what's wrong with javafx, webview is pretty coo
>>
>>53587424
No, he is a retard but his point is correct GC of JVM is a piece of shit and the creator of that abomination must be painfully killed
>>
>>53587443
Of course no you fucking idiot
>>
>>53595315
OOP is easy, but that doesn't make java any less shit. What's with all the painfully slow languages running in VMs? When will this meme die? I much prefer running my code on bare metal.
>>
>>53599518
You mean websites should be written in native code?
>>
All these inferior n misguided beings
learn MIPS n x86 for god sake
>>
>>53586711
Wait until you fall for the python meme.
>>
>>53599440
>horrible toolset, provides no direct integration between FXML and Java classes
>errors out the woozoo if something goes wrong, does not really tell what is wrong
>does not generate metacode for interface, is parsed at runtime instead
>no consistency in how "nodes" work, some resizable, others not, some need terrible hacks to resize properly
>layouts never scale well out-of-the-box
Need I list more?
>>
The only good language is ocaml, desu. By this I mean that while scheme is a great idea, it only has (so shit they might as well be) unusable implementations; and ocaml is the only language even remotely in the same league. Moreover, it has several advantages over lisps such as the static typing, speed and native destructuring constructs.
>>
>>53586756
Java isn't bad. It has some good libraries and it's that you don't have to deal with memory management. I've heard csharp is what java wanted to be and more though.
>>
How do java GUIs easily and smoothly? I don't want to touch the code for individual elements unless I need to modify some specific functionality/form. I also want proper display size scaling out of the box with minimal effort. Haven't touched things since swing was king. Advice?
>>
>>53588587
lmfao, good one anon. Hey could you pour me a cup of water without a cup, thanks.
>>
>>53589193
this
>>
>>53586797
>contrarians
C# contains something called Garbage Collection, that mostly manages itself. C++ is where you start doing memory management, and C is where you start ripping your hair out.
>>
>>53596760
But you abstraction would force even snails to have legs therefore it is a bad abstraction
Thread replies: 195
Thread images: 19

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.