Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (517)
Games in Android Showcase (123)
games submitted by our members
Games in WIP (578)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 2 [3] 4
  ignore  |  Print  
  What would you like to see in Java?  (Read 7433 times)
0 Members and 1 Guest are viewing this topic.
Offline Groboclown
« Reply #60 - Posted 2013-10-08 21:48:36 »

But how is this sort of thing handled with C++ streams?

I was just reading about this: http://yosefk.com/c++fqa/web-vs-c++.html#misfeature-4

To sum up: it doesn't.

Offline Jeremy
« Reply #61 - Posted 2013-10-09 00:04:41 »

Often though, doing that is a terrible idea and universally considered bad practice. A lot of bugs have been created by using non-literal format strings (bugs, and software exploits)

Objective(ly)-C(rap) compilers usually do a check for that and throw a warning on compile time if you are doing that. Like-wise, so do a lot of modern C++\C compilers.

JevaEngine, Latest Playthrough (This demo is networked with a centralized server model)

http://www.youtube.com/watch?v=rWA8bajpVXg
Offline ra4king

JGO Kernel


Medals: 353
Projects: 3
Exp: 5 years


I'm the King!


« Reply #62 - Posted 2013-10-09 00:26:59 »

I want a pink unicorn that can fly and make me breakfast in bed every morning.

Oh wait, I'm not getting that either.

This is the millionth thread I've seen where people day-dream about what they want in Java. Suck it up and/or learn a different for a change!

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline relminator
« Reply #63 - Posted 2013-10-09 00:50:17 »

I want a pink unicorn that can fly and make me breakfast in bed every morning.

Oh wait, I'm not getting that either.

This is the millionth thread I've seen where people day-dream about what they want in Java. Suck it up and/or learn a different for a change!

Well said.

Learn more than one language so that your choices are not limited.

Offline xsvenson
« Reply #64 - Posted 2013-10-09 08:08:07 »

But in the end, they are limited such as much.
By now, most people here have learned and chosen their main language and maybe a secondary one too. Those are the languages that are in use daily or semi-daily. This means, that the choice itself is already made. And since we are on Java boards, the choice is Java (or some other jvm language).

“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Offline princec

JGO Kernel


Medals: 409
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #65 - Posted 2013-10-09 08:51:58 »

I want POP-11. With blackjack, and hookers.

Cas Smiley

Offline Roquen
« Reply #66 - Posted 2013-10-09 08:58:11 »

What good is blackjack and hookers without the booze?

I want a pink unicorn that can fly and make me breakfast in bed every morning.

Oh wait, I'm not getting that either.

This is the millionth thread I've seen where people day-dream about what they want in Java. Suck it up and/or learn a different for a change!
Here's the deal.  Languages evolve or the die a slow death.  The JVM must evolve or it heading towards being a FORTRAN or COBOL.  I've actually been more optimistic about the JVM's future since Orcale took over. 

One thing that virtually everyone overlooks is 'invokedynamic'.  Sure people take about lamdba's, but that's just the tip of the iceberg.  invokdynamic is huge...by far the biggest JVM change ever.  It allows user & language definable endpoints which basically opens up some very important runtime compiler features.  Stuff along this line would be (by far) the biggest bang-for-your-buck features.  So structures open up huge possibilities (which has been talked about in various forms) and changing the transport IR (never talked about and is probably too much to hope for).
Offline Mads

JGO Ninja


Medals: 26
Projects: 3
Exp: 6 years


One for all!


« Reply #67 - Posted 2013-10-09 09:26:58 »

I don't know if this was already said or not, but I'd like functions to pass as parameters. Python has this, and it's useful. Smiley

Offline Jeremy
« Reply #68 - Posted 2013-10-09 09:31:21 »

I don't know if this was already said or not, but I'd like functions to pass as parameters. Python has this, and it's useful. Smiley

You can get the same effect very easily by using the command pattern, and less easily (and much more messy) using reflection.

To me, passing a function as an argument would be pointless unless it used a well defined interface.

JevaEngine, Latest Playthrough (This demo is networked with a centralized server model)

http://www.youtube.com/watch?v=rWA8bajpVXg
Offline princec

JGO Kernel


Medals: 409
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #69 - Posted 2013-10-09 09:34:45 »

Isn't this what lambda is all about?

Cas Smiley

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Mads

JGO Ninja


Medals: 26
Projects: 3
Exp: 6 years


One for all!


« Reply #70 - Posted 2013-10-09 09:48:58 »

Isn't this what lambda is all about?

Cas Smiley

I have no clue. Sad Trying to find out only yielded insanely vague results, or jargon I'm unfamiliar with.

Offline nsigma
« Reply #71 - Posted 2013-10-09 09:53:48 »

Isn't this what lambda is all about?

Pretty much, and thanks to VM changes Roquen talks about above, should be significantly better performing than command pattern or reflection.

changing the transport IR (never talked about and is probably too much to hope for).

Assuming you don't mean changing out the infra-red parking sensor in your car  Wink I'm assuming you're talking bytecode representation?  Clueless If so, what you thinking?

Praxis LIVE - open-source intermedia toolkit and live interactive visual editor
Digital Prisoners - interactive spaces and projections
Offline princec

JGO Kernel


Medals: 409
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #72 - Posted 2013-10-09 10:19:35 »

Java bytecode isn't particularly well suited to all sorts of high-level analysis and optimisations. Changing the bytecode format into various other things would open up a bunch of new possibilities. For example the Dalvik IR is specially designed to make it JIT compile easily and with high speed and less performance cost than ordinary Java bytecode.

Cas Smiley

Offline Spasi
« Reply #73 - Posted 2013-10-09 11:34:40 »

I have no clue. Sad Trying to find out only yielded insanely vague results, or jargon I'm unfamiliar with.

Read these two:

State of the Lambda
State of the Lambda: Libraries Edition
Offline ClickerMonkey

JGO Coder


Medals: 20


Game Engineer


« Reply #74 - Posted 2013-10-09 12:39:56 »


Boost can:

1  
std::cout << boost::format("writing %1%,  x=%2% : %3%-th try") % "toto" % 40.23 % 50;


I think this is in the newest version of C++:

1  
std::cout << std::putf("this is a number: %d\n",i);


Nonetheless, he is missing the advantage to << and >>.

There is no reason you can't replace << with write, >> with read, + with add, - with subtract * with dot (or cross?)

It's just ascii art. You aren't an ascii artist, you're a programmer. There is no reason in hell for us to be throwing ascii art into our code.

Ha, um NO. It's called readability.

Let's say I have an equation like so:

1  
2  
Vector v0, v1, Vt;
Vector V = ((v1 - v0) * time + v0) + (Vt * restitution)


Using methods, you get something like:
1  
2  
Vector Vtr = Vt.mul(restitution);
Vector V = v1.sub(v0).mul(time).add(v0).add(Vtr);


Now THAT's ugly. AND, how do you decide when to return a new Vector and when to return this? With the above code it's safe to say a new vector is returned each time, which is often unacceptable if this code is running many times.

Of course you could write code like this (which I do to get around lack of operator overloading and structs)

1  
Vector V = v1.sub(v0).muli(time).addi(v0).addsi(Vt, restitution);


Where a method ending in i means "immediate" which applies the operation to this and returns this (opposed to applying the operator to a new vector and returning it - like sub in this example).

Because of the lack of operator overloading I have useless comments that merely state "Here's the one line equation I'm trying to achieve incase anyone looks at this and goes WTH IS GOING ON"


Offline princec

JGO Kernel


Medals: 409
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #75 - Posted 2013-10-09 12:50:01 »

That's not what he meant by replacing << with method names. Something like this solves the issue for more or less everybody:

1  
2  
Vector v0, v1, Vt;
Vector V = ((v1 minus v0) mul time add v0) mul (Vt cross restitution)


especially with appropriate syntax colouring. The reuse of various ascii symbols to mean just about anything is what irks nearly everybody against operator overloading, but the fundamental concept of being able to define unary and binary operators in the language I don't think anyone's against as such.

Cas Smiley

Offline BoBear2681

JGO Coder


Medals: 19



« Reply #76 - Posted 2013-10-09 12:57:34 »

Often though, doing that is a terrible idea and universally considered bad practice. A lot of bugs have been created by using non-literal format strings (bugs, and software exploits)

Objective(ly)-C(rap) compilers usually do a check for that and throw a warning on compile time if you are doing that. Like-wise, so do a lot of modern C++\C compilers.

Really?  But all of my user-facing text is externalized.  No idea how that's typically done with C++, but how it's done is irrelevant - format strings can vary in the location of their parameters from one language to the next.  Of course the format strings aren't going to be freeform, they're known at build time, as they were given to you by localizers.

Good to see Boost and/or newer standards support this kind of thing though.
Offline Jeremy
« Reply #77 - Posted 2013-10-09 13:13:33 »

Ha, um NO. It's called readability.

I am arguing against ascii art, not unary and binary operators as princes said. I am simply asking that you give them a name. For god's sake, why would we use symbols to represent complex functions like read\write?

Overloading established operators to some twisted meaning on complex objects is a terrible idea.

JevaEngine, Latest Playthrough (This demo is networked with a centralized server model)

http://www.youtube.com/watch?v=rWA8bajpVXg
Offline ClickerMonkey

JGO Coder


Medals: 20


Game Engineer


« Reply #78 - Posted 2013-10-09 13:16:45 »

That's not what he meant by replacing << with method names. Something like this solves the issue for more or less everybody:

1  
2  
Vector v0, v1, Vt;
Vector V = ((v1 minus v0) mul time add v0) mul (Vt cross restitution)


especially with appropriate syntax colouring. The reuse of various ascii symbols to mean just about anything is what irks nearly everybody against operator overloading, but the fundamental concept of being able to define unary and binary operators in the language I don't think anyone's against as such.

Cas Smiley

Ahh okay. That's a better idea than what Java currently has, although it requires you to put parenthesis around everything (because a lack of order of operations). You might as well jump right to operators! :-)

I am arguing against ascii art, not unary and binary operators as princes said. I am simply asking that you give them a name. For god's sake, why would we use symbols to represent complex functions like read\write?

Gotcha. IMO I don't think read and write are complex... at first I HATED the << and >> symbols... so odd and stupid. But after using them extensively I'm comfortable with them. They're just a feature of the language, you don't have to use them.

Offline Jeremy
« Reply #79 - Posted 2013-10-09 13:23:55 »

That's not what he meant by replacing << with method names. Something like this solves the issue for more or less everybody:

1  
2  
Vector v0, v1, Vt;
Vector V = ((v1 minus v0) mul time add v0) mul (Vt cross restitution)


especially with appropriate syntax colouring. The reuse of various ascii symbols to mean just about anything is what irks nearly everybody against operator overloading, but the fundamental concept of being able to define unary and binary operators in the language I don't think anyone's against as such.

Cas Smiley

Ahh okay. That's a better idea than what Java currently has, although it requires you to put parenthesis around everything (because a lack of order of operations). You might as well jump right to operators! :-)

I am arguing against ascii art, not unary and binary operators as princes said. I am simply asking that you give them a name. For god's sake, why would we use symbols to represent complex functions like read\write?

Gotcha. IMO I don't think read and write are complex... at first I HATED the << and >> symbols... so odd and stupid. But after using them extensively I'm comfortable with them. They're just a feature of the language, you don't have to use them.

When I say they are complex I mean the process not the usage.

Anyway, you're argument for operator overloading was presented to James Gosling (they're a feature, it isn't the language designer's jobs to decide if you can use it):

"Many C++ design decisions have their roots in my dislike for forcing people to do things in some particular way [...] Often, I was tempted to outlaw a feature I personally disliked, I refrained from doing so because I did not think I had the right to force my views on others." - Bjarne Stroustrup

Which was a response to James Gosling, who left operator overloading out of Java as a personal preference. If that was his justification, I disagree with his stance and tend more towards Bjarne's.

Anyway, that's enough on operator overloading.

JevaEngine, Latest Playthrough (This demo is networked with a centralized server model)

http://www.youtube.com/watch?v=rWA8bajpVXg
Offline ClickerMonkey

JGO Coder


Medals: 20


Game Engineer


« Reply #80 - Posted 2013-10-09 14:30:23 »

Operator overloading and other features are not just mater of personal taste.

Yes it is.

This idea creates mess in code everywhere.

If you're a bad programmer.

That's not just stuff someone can throw around the code and smile like a fool saying "look how smart I am".

If someone thinks that using tons of operators is "smart", then they are a fool. However, when you use something correctly there are no problems.

Online kappa
« League of Dukes »

JGO Kernel


Medals: 78
Projects: 15


★★★★★


« Reply #81 - Posted 2013-10-09 14:37:34 »

IMO the biggest thing lacking with client side Java isn't language features but proper deployment tools. Just to get your Java application out there you need to jump tons of hoops, use all sorts of third party apps/hacks (or roll your own). Executable Jars, JWS and Applets are pretty much useless for any mass deployment.

Its always been the case that Sun/Oracle have screwed this up and IMO its the biggest thing that has harmed the Java platform. e.g. Java Applets could have easily been the preferred web tool and be where Flash is today if not for the lack of focus on the deployment and client side issues. Another example was the mobile space where Java ME pretty much owned everything and again screwed up.

IMO it'd be a good idea for Oracle to throw some resources (maybe a whole Java SE release cycle) on trying to address this. Focus on getting some sort of web presence back for Java (been hearing rumours about a Java VM written in JavaScript allowing byte code to run in the browser but nothings been shown). Also there is a need for proper AOT compilers/tools for Java, which should allow it to run as native executables (easier to deploy, faster startup, smaller memory footprint, more familiar to users, etc) and on all the different platforms where VM's might not be suitable. If C# can make it onto almost every Console and Mobile out there, don't see why Java can't.

There are various third party attempts trying to solve the above (RoboVM, Excelsior Jet, GWT, etc) but with a proper push and official assistance from Oracle they can solve the issue much more quickly and properly.
Offline Roquen
« Reply #82 - Posted 2013-10-09 14:50:37 »

Operator overloading and other features are not just mater of personal taste. This idea creates mess in code everywhere. Operator overloading, as other features should be used when this is necessary.

Especially this is important with arithmetic operators. That's not just stuff someone can throw around the code and smile like a fool saying "look how smart I am".

And Stroustoup is probably a schizofrenic because in many of his videos he wants do dictate design rules. That comparing to the your quote is simply contradictory.
Parrot much?  Forget C++.  There are no lessons about operator overloading to be learned there.

LOOK HERE for some scratching of the surface: http://www.java-gaming.org/topics/the-hidden-cost-of-c/27398/msg/245202/view.html#msg245202
Offline ClickerMonkey

JGO Coder


Medals: 20


Game Engineer


« Reply #83 - Posted 2013-10-09 15:04:54 »

So... you're saying we should reconvene in another year to have the same arguments? Hear hear!

Offline Roquen
« Reply #84 - Posted 2013-10-09 15:14:42 »

Hehe.  Since I haven't said it here: I could care less about java getting operator overloading.  It's an uber nice feature to have, but it's too low on my list to care about ATM.  Not having it prevents me from porting a bunch of my code to java...but that doesn't matter too much as I could simply write a DSL myself.  But I'm not going to do that either because my main concerns are elsewhere...at the JVM feature set level.  The only reason I open my mouth on the subject is because dismissing operator overloading isn't doing anyone any favors.  C++ is mostly at fault here.  Forget C++ on this subject.
Offline SHC
« Reply #85 - Posted 2013-10-09 15:25:17 »

I would like to have auto packager for all the major operating systems. Currently I'm using an NSIS script to create a windows launcher, using JarSplice to create a linux shell script and I wrote my own script to package for mac.

If anybody is interested in packaging java 7 apps for mac see this.

<a href="http://www.youtube.com/v/Unl8dgqFv6o?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/Unl8dgqFv6o?version=3&amp;hl=en_US&amp;start=</a>

Offline Cero
« Reply #86 - Posted 2013-10-09 23:29:09 »

I am arguing against ascii art, not unary and binary operators as princes said. I am simply asking that you give them a name. For god's sake, why would we use symbols to represent complex functions like read\write?
I very much agree, hate that -> shit
Why do you think I like Java: everything is spelled out.
image public would be #
and extends would be ~
are we humans or what ? whos gonna read that ?

I'm also exclusively coding in Allman style because I think opening a bracket and writing code immediately is not as easy to read.

Offline Danny02
« Reply #87 - Posted 2013-10-10 08:21:18 »

been hearing rumours about a Java VM written in JavaScript allowing byte code to run in the browser but nothings been shown

There is, take a look: http://wiki.apidesign.org/wiki/Bck2Brwsr
Offline princec

JGO Kernel


Medals: 409
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #88 - Posted 2013-10-10 08:43:55 »

Who would like to write a compiler where all the Java keywords were replaced with an ascii character Smiley? Just an exercise for the curious.

Cas Smiley

Offline SHC
« Reply #89 - Posted 2013-10-10 08:51:02 »

Who would like to write a compiler where all the Java keywords were replaced with an ascii character Smiley? Just an exercise for the curious.

What!! Huh It'll give out a lot of problems.

Pages: 1 2 [3] 4
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

DarkCart (24 views)
2014-11-01 00:44:48

DarkCart (30 views)
2014-11-01 00:43:57

TehJavaDev (40 views)
2014-10-27 06:28:38

TehJavaDev (31 views)
2014-10-27 06:27:51

DarkCart (45 views)
2014-10-26 22:37:11

Luminem (27 views)
2014-10-26 13:17:50

Luminem (31 views)
2014-10-26 13:14:04

theagentd (36 views)
2014-10-25 18:46:29

Longarmx (64 views)
2014-10-17 06:59:02

Norakomi (62 views)
2014-10-16 18:22:06
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!