[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


Does being able to run on any OS even matter for Java? Most programs I've seen coded for other languages run just fine on Windows and Linux, you just have to build it twice instead of once and tweak a few things.
>>
>>106630859
poo
>>
>>106630868
please sir do the needful and serious reply sir!
>>
>>106630859
It's for situations where your software provider went out of business years ago. Rarely matters for home use, but can be relevant for corporations.
>>
>>106630859
Multiple builds is more of an issue for closed source software sold for money. If you sell something there's an expectation it'll actually work which means you have to test it on the platforms you're building for. Java's promise was letting you reduce that testing burden. However software evolved a lot and OSS really took off which has made running in a VM like Java a lot less attractive.
>>
yes because it means that it runs everywhere. if something does not need c level performance it may be beneficial for the developer to use a jvm lang like java. andriod has something similar to the jvm baked into android which means "apps" only have to be written once. java may not be the best language but there are plenty of jvm languages to choose from.
>>
>>106630997
What're the downsides of java aside from performance? I'm not coding anything that requires a super beefy gpu, just simple text-based programs.
>>
>>106630997
If your language is interpreted or has good cross compilation and platform independent abstractions then it will also run everywhere, Java is not unique here.
>>
>>106631009
memory hog (they are working on it), huge&slow enterprise frameworks are what most companies use
netflix runs on Java, it's a good lang
>>
>>106631009
no sane person would write a hobby project in java
its bloated shit slow to start same as its IDEs
is corpo soulless lang
>>
Why is Java and C# so fucking slow at floating point number operations? I was doing some tests to pick a language for the physics engine I've just built and both Java and C# were both over an order of magnitude slower at doing Vector math compared to C++.
>>
>>106632119
I mean yeah, a hobby project in a language similar to what you do at your job doesn't sound very interesting. Spring+Hibernate are indeed quite soulless. Or may Allah forgive me for uttering this word, JEE.
You need to give some points to Java though, it's really improving in recent years.
>>
>>106632198
They are there for backward compatibility reasons, no one uses float and double when any precision or performance is needed. On the other hand, because of the lack of operator overloading even stuff like BigDecimal still has this butt-ugly syntax, so I don't think Java is any good for numerical computing.
var bd1 = new BigDecimal("4.0");
var bd2 = new BigDecimal("2.0");
BigDecimal difference = bd1.subtract(bd2);
>>
>>106630859
>Does being able to run on any OS even matter for Java?
yeah
for an application server platform, some corporations run Windows Server while some run an enterprise flavor of Linux
it's a huge advantage not to need any platform-specific code

>Most programs I've seen coded for other languages run just fine on Windows and Linux, you just have to build it twice instead of once and tweak a few things.
with Java you don't have to tweak anything at all, you can reuse the same compiled jars/classes between platforms with absolutely no modification

also the advantage becomes much larger with huge enterprise software, ie. stuff that Java is mainly used for

>>106632119
you really don't want a quirky "interesting" language for anything you intend to work on for longer than half a year
if you want to focus on the actual program you're writing and not fighting the language you're writing it in, boring and predictable is exactly what you want in a language

>its bloated shit slow to start same as its IDEs
get a computer from this century
sure, an IDE starts slower than a plaintext editor. but once it loads, you can work with it much more efficiently than switching between different "light" applications
>>
>>106630859
It depends on what you're doing. Android popularity is also about being cross platform. ARM, MIPS and x86 all work in Android, if it's in Java, or whatever Google calls they're version. Games also benefit from running in any OS but sadly the market decided C# was the way. Desktop applications also benefit from cross platform but then they won't look native and are slower to start up.
>>
>>106632198
>>106632245
Working with a higher level language you won't achieve automatic vectorisation as easily as in C/C++, that's probably what causes the difference.
>>
>>106632245
>no one uses float and double when any precision or performance is needed
Educate me, what's the alternative to float and double? Are you suggesting that people just use integers and fixed point numbers everywhere?
>>
>>106632521
anything that allows for arbitrary precision arithmetic, probably most modern languages do this by default
>>
>>106632557
Doesn't that have worse performance than floating point?
>>
>>106632601
Well normally floats/doubles should perform better because they are simpler numbers, but there are high-performance libraries that get similar results by doing clever optimizations, some of those also add arbitrary precision arithmetic.
I don't think there's a library that does generic vectorisation in Java (yet).
>>
>>106632714
imagine needing to import libraries just to do math on numbers lol
you know there's a library in your CPU for doing floating point vector operations, called SSE/AVX?
>>
>>106632756
In Java we just filter map reduce on collections of business entities. We don't care about no stinking numbers and vectors.
>>
>>106632756
imagine needing to import libraries just to do things with text lol
>>
>>106630859
Apparently not. ANSI and ASCII codes aren't universal depending on hardware and OS. So you may as well write it twice.
>>
>>106633409
Java uses UTF-8 by default
>>
>>106631009
>What're the downsides of java aside from performance?

- language is still pretty low level

- most java development is done with Spring (libary) which is a memory hog and creates absurdly big, slow-to-start projects

the JVM itself is a really efficient bytecode VM, perhaps the most efficient one available yet. Java (the language) is a shitty language, however there are better languages available for the JVM like Clojure and Scala. Or, if you are dumb enough to be unable to learn them, there is Kotlin, which is still better than Java.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

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.