Jump to content

Recommended Posts

Posted

To clarify: Java is not a functional programming language in the sense that I meant it, where functions can be passed around like variables.

I'm trying to think of a language without at least some form of functional programming other than assembly (which isn't a language so much as a transcoding)

LISP-like dialects for sure such as Clojure. But I was thinking more along the lines of Scala or Javascript (the latter is actually pretty good at it outside of the browser and with certain language "features" avoided).

Posted

No, I don't. In quoting it, I saw it was a lmgtfy to google.

EDIT: Dangit, my phone glitched and I pressed the one above. Ha. Ha.

Edit: why am I allowed to delete my own posts?

Success! I have managed to get the kiwi bird to click one of my links!

Posted

To clarify: Java is not a functional programming language in the sense that I meant it, where functions can be passed around like variables.

Well, you're right, but you can mimic the same functionality with not too huge a memory or performance loss (unless you're in a tight loop) with instantiation of memberless classes. I do wish Java had method references of some kind, but the pattern of dispatch with enum + instantiate empty class (like for packet types by integer ID in the packet) works well.

Posted

Well, you're right, but you can mimic the same functionality with not too huge a memory or performance loss (unless you're in a tight loop) with instantiation of memberless classes. I do wish Java had method references of some kind, but the pattern of dispatch with enum + instantiate empty class (like for packet types by integer ID in the packet) works well.

Correct, but such "features" of Java tend to be more advanced topics than basic inherent properties of the language. I'm sure given any language and enough free time, one language can be developed such that it can mimic the inherent features of another.

Posted

Yes, some of Java's basic inherent properties are a bit iffy, such as the lack of unsigned types. I"ve gone through all the argumentation, and I won't say I disagree with it, but having to do

int foo = 60_000 ;

short bar = foo & 0xFFFF ;

foo = bar & 0xFFFF ;

to not have the sign bit interfere is...irritating.

Posted

Java is very similar to Lua (they are basically the same thing)

hold the phone here, that is not even close to true. they are similar in that they are programming languages and have a few shared syntactical bits that are common to most high level languages. that is where it ends. lua is a) not based on or dependent on java, and B) a scripting language as opposed to a compiled language. yes I know java JIT compilations and byte code, but it's still compiled.

lua has some very different ideas about things like variables and objects as opposed to java.

edit: to the topic at hand, lua is perfectly capable of handling a text-based RPG type game. I say go for it. I learned a lot when I tried to do something similar with C++ many years ago.

Posted

I think the word you were looking for was "interpreted" versus compiled, interpretation being for things like PHP and JavaScript, and compilation being for things like Java and C.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...