5 ms·
I really liked Scala when I played around with it (bare with me here), but when deciding on what to use on a project I'm starting, targeting the JVM is a downsi
by ld00d 10y ago
I really liked Scala when I played around with it (bare with me here), but when deciding on what to use on a project I'm starting, targeting the JVM is a downside. Can I depend on the JVM being on the target machine? If not, I'll have to deal with the dependency. However, if I choose a compiled language like Rust, I don't have to worry about that.
- smt88 10y agoMost people writing Java will be able to control the presence of the JVM. Only B2C desktop apps, which are fairly rare these days, will have to worry much about the dependency.
- ld00d 10y agoUnless you're doing JavaFX or something like that.
- eropple 10y agoUnder what circumstances are you writing software for deployment in places you don't have administration access on (i.e., your servers, which should be deployed with CM as-is and make adding dependencies trivial) where you cannot package OpenJDK (this is trivial on Windows, OS X, and Linux), cannot expect a system administrator to install the JVM, and can expect Rust to run? There is a slice of the universe where this exists, but it's not really Kotlin's target in the first place (and I think that's basically self-evident from everything around it) so I'm not sure why you'd try to jam that square peg in the round hole to begin with.
- ld00d 10y agoI'm thinking of client machines. People balk at installing Java these days. Is there a way to get the JVM without Java? Is Kotlin not capable of being a client application?
- tormeh 10y agoYou just package the JVM with the application itself. Create a .bat/.exe/.sh/binary file that calls the JVM with your program as the argument. It's simple, but it will increase the download size of your program significantly (unless your program is huge - then it doesn't matter)
- maxxxxx 10y agoNo installer needed? Just copy the files somewehre? That would be nice.
- eropple 10y agoSure. Plenty of Java-based games do this.
- freekh 10y agoThis may come off a bit snarky but is there really plenty of Java games out there? If so, anything anybody might have heard off?
- Nullabillity 10y agoMinecraft was somewhat popular a few years ago. :P Runescape also used to be a pretty big one, even if it's been shrinking lately AFAIK.
- bdavisx 10y agoMinecraft would be one that a few people have heard of... Many games on Android are also Java based obviously.
- mike_hearn 10y agoOr look at the javapackager tool that comes with JDK8.
- ex3ndr 10y agoKotlin also compiles to JS then
- premium-concern 10y agoDid you try it? It's not really usable in its current state.
- dorfsmay 10y agoWow!I don't like the JVM and I'm a rust fan... But you've touched a nerve here, this is my biggest disappointment with rust. The JVM runs on A LOT more platforms than LLVM currently supports!
- lmm 10y agoScala native exists, and is probably a similar overall maturity to Rust (scala native itself is newer, but much of the ecosystem has been around longer). (Why are you running things on uncontrolled machines? Don't you have puppet or the like set up so that every machine has whatever it needs to run whatever you put there?)
- walkingolof 10y agoScala actually has two (official) targets, JVM and Javascript and will pretty soon have a third, "native", using LLVM. https://www.youtube.com/watch?v=ArWWlwQl37A https://www.youtube.com/watch?v=ArWWlwQl37A