Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (600)
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 7831 times)
0 Members and 1 Guest are viewing this topic.
Online princec

« JGO Spiffy Duke »


Medals: 429
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #90 - Posted 2013-10-10 08:51:41 »

That's my point Smiley

Cas Smiley

Offline Roquen
« Reply #91 - Posted 2013-10-10 08:52:24 »

Just take janino (or javac) and write an AST visitor to spew it out...one look should be enough.
Offline Roquen
« Reply #92 - Posted 2013-10-10 12:16:44 »

Oh yeah.  Since this whole ascii art thing popped out of the conversation about operators I'd like to point out:

Reducing character count and operator overloading have absolutely nothing in common.  If you think that they do..that's part of problem.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Troncoso

JGO Coder


Medals: 20



« Reply #93 - Posted 2013-10-10 12:27:37 »

This thread is getting kind of silly. There's no need to tell people what they want in a language is "wrong".
Online princec

« JGO Spiffy Duke »


Medals: 429
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #94 - Posted 2013-10-10 12:34:38 »

Sometimes people ask for things without knowing why they're not there in the first place, or even why they want these things (eg. wanting functions as objects without knowing of the existence of lambda)

Cas Smiley

Offline Troncoso

JGO Coder


Medals: 20



« Reply #95 - Posted 2013-10-10 12:47:20 »

Well, they aren't technically asking for anything. We are just discussing what we'd like. Even if operator overloading was not included for a very valid reason, that doesn't mean someone *shouldn't* want it.

And in my case (even though this was about C++), I said I would prefer functions over the ostream operators, and that sparked a lot of backlash.

Anyway. I would kind of like to see string indexing in arrays like PHP without needing a Dictionary class. That was said earlier, I believe.
Offline Danny02
« Reply #96 - Posted 2013-10-10 12:52:32 »

I would kind of like to see string indexing in arrays like PHP without needing a Dictionary class. That was said earlier, I believe.

I don't get your point, could you elaborate?
Offline Roquen
« Reply #97 - Posted 2013-10-10 13:10:02 »

I assume:  Map foo .... ; foo["PI"] = 3.14159;  This was on the "todo" list a couple of years ago, but may have been yanked.
Online princec

« JGO Spiffy Duke »


Medals: 429
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #98 - Posted 2013-10-10 13:12:38 »

It was in Project Coin, yes. I think ultimately everything in Coin is still on the to-do list or already done.

Cas Smiley

Offline Danny02
« Reply #99 - Posted 2013-10-10 13:39:50 »

Soo, he wants a new special operator which only works with one special class (Map) with only one key class (String).
I don't like such very specific magic features in languages.

That is also one thing I like so much about Scala. It has of course also some "magic", but it is general and can be used by everyone, for example:
1  
2  
3  
a("PI") = 3.14
//gets replaced by ->
a.update("PI", 3.14)


how some class implements or defines(types) the update method doesn't matter, it just get replaced.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Roquen
« Reply #100 - Posted 2013-10-10 13:59:28 »

It works with any type of key and any type of value...for all Maps.
Offline Troncoso

JGO Coder


Medals: 20



« Reply #101 - Posted 2013-10-10 14:10:16 »

Here's an example in PHP (this is just pulled from the webserver at work):

1  
2  
3  
4  
5  
6  
$headers = array(
"pid"=>"Part Number",
"serial"=>"Serial Number",
"entry_date"=>"Date",
"so_number"=>"Sales Order",
"account"=>"Account");


So, it's pretty much just a Map, but it works natively in an array structure. So, to access any value, you just do:

1  
$headers["pid"]


Using this you can create trees using just arrays and access stuff like this:

1  
cars["sedans"]["two-door"]["green"]


Where "green" is an array in the "two-door" array which is in the "sedans" array, which is in the "cars" array. You can do this with Java, but when indexing with integers, it gets really confusing really fast. Or, you have to build a class to handle it, and even then, you have to do something like:

1  
cars.get("sedan").get("two-door").get("green");


And just to be clear, the key/values can be any type. Considering PHP is very loosely typed ($var = new Date(); $var = array(); is valid), then it's not a big deal. In Java, you'd have to use generics.
Offline Jeremy
« Reply #102 - Posted 2013-10-10 14:19:45 »

Oh yeah.  Since this whole ascii art thing popped out of the conversation about operators I'd like to point out:

Reducing character count and operator overloading have absolutely nothing in common.  If you think that they do..that's part of problem.

I've clarified already that I am not arguing against unary and binary operators, but that I am arguing against using (well established and defined) symbols for their naming.

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

http://www.youtube.com/watch?v=rWA8bajpVXg
Offline Roquen
« Reply #103 - Posted 2013-10-10 14:27:01 »

I wasn't waving my finger at anyone, but there's probably someone reading it that way.

@Troncoso: so you should be getting what you want (more or less) in the next version then.
Offline HeroesGraveDev

JGO Kernel


Medals: 309
Projects: 11
Exp: 3 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #104 - Posted 2013-10-10 20:16:18 »

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

And lets change the most common keywords to whitespace characters!

public = \n
static = \t
private = \r

The fun thing would be that the code would all have to be on one line to avoid spamming public/private in the wrong places. No indentation either. Spaces only.
Oh, and if you managed all that, good luck distinguishing public and private. Evil


EDIT: What the... I just discovered a new smiley face. ^

Offline Roquen
« Reply #105 - Posted 2013-10-10 21:24:45 »

That's cliche...http://en.wikipedia.org/wiki/Whitespace_(programming_language)
Offline xsvenson
« Reply #106 - Posted 2013-10-10 21:42:04 »

Here's a great idea.
I'd like the JVM to be the OS...
... and the browser too.

“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 HeroesGraveDev

JGO Kernel


Medals: 309
Projects: 11
Exp: 3 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #107 - Posted 2013-10-10 22:12:26 »

Here's a great idea.
I'd like the JVM to be the OS...
... and the browser too.

Mozilla's already done something like that. (http://en.wikipedia.org/wiki/Firefox_OS)

Offline Groboclown
« Reply #108 - Posted 2013-10-10 22:25:36 »

Here's a great idea.
I'd like the JVM to be the OS...
... and the browser too.

Mozilla's already done something like that. (http://en.wikipedia.org/wiki/Firefox_OS)

And there was a project back in the 90's that I worked on, to make an open source version of Sun's JavaOS: http://jos.sourceforge.net/

Offline SHC
« Reply #109 - Posted 2013-10-11 01:20:46 »

There is also JNode OS. It is developed mostly in java but uses a linux kernel to run.


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.

rwatson462 (28 views)
2014-12-15 09:26:44

Mr.CodeIt (19 views)
2014-12-14 19:50:38

BurntPizza (37 views)
2014-12-09 22:41:13

BurntPizza (72 views)
2014-12-08 04:46:31

JscottyBieshaar (34 views)
2014-12-05 12:39:02

SHC (46 views)
2014-12-03 16:27:13

CopyableCougar4 (42 views)
2014-11-29 21:32:03

toopeicgaming1999 (110 views)
2014-11-26 15:22:04

toopeicgaming1999 (96 views)
2014-11-26 15:20:36

toopeicgaming1999 (29 views)
2014-11-26 15:20:08
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!