Which free high-level language?

Started by
35 comments, last by Raghar 18 years, 7 months ago
Quote:Original post by Glak
using a language without compile-time type safety is like eating sandpaper. You can do it and you won't die, but really, why would you?


float secondsSinceMidnight = numberOfToasters / temperatureInKelvin;

Now tell me. Do you reeeeally want to put so much trust in the power of static typing to find semantic errors?
Advertisement
Quote:Original post by Rob Loach
Boo seems to be the .NET version of Python.

No, its syntax is merely inspired by Python.

Btw, quote your URLs (<a href="<URL>">...), and leave the window management to the user. [smile]

Quote:Original post by MaulingMonkey
With GNU Smalltalk, the examples had me using it in "interactive" mode, wherein you type in statements directly - e.g.:

'Hello, World!' printNl !


To print 'Hello, World!'.

print 'Hello, World!'

Yep, Python wins for clarity, intuitiveness and readability. Until you start to use expert facilities, there's hardly a language that can touch it.
Quote:Original post by Oluseyi
Switching gears entirely, you may want to look at something like Erasmotron, sunandshadow.


Oh the Erasmatron, that's cool, but last I checked it was only for Mac, not to mention that it doesn't support 3-D, collision detection, and other rather important things like that. ;) If I was going to use an engine I'd probably pick DarkBasic, but that's not free. I'm leaning toward Java because it's widely used, my roommate's familiar with it so he could help, I hear there are nice toolkits available, and I like it's philosophy of being organized and safe.

I want to help design a "sandpark" MMO. Optional interactive story with quests and deeply characterized NPCs, plus sandbox elements like player-craftable housing and lots of other crafting. If you are starting a design of this type, please PM me. I also love pet-breeding games.

Quote:Original post by Oluseyi
Quote:Original post by MaulingMonkey
With GNU Smalltalk, the examples had me using it in "interactive" mode, wherein you type in statements directly - e.g.:

'Hello, World!' printNl !


To print 'Hello, World!'.

print 'Hello, World!'

Yep, Python wins for clarity, intuitiveness and readability. Until you start to use expert facilities, there's hardly a language that can touch it.


The syntax is a bit weird comming from a C/C++/Java/OtherCClone background, but it's still fairly intuitive once you realize how OO centric Smalltalk is, and I'd still consider it intuitive. Ironically, this different syntax was one of the things that drew me into investigating the language.

Now, toss up a GUI example.

image := ImageMorph new.image image: (Form fromFileNamed: 'C:\Documents and Settings\Mike\My Documents\My Pictures\newavatar.gif').image openInWorld.


That loads and displays, well, I think that's pretty easily determined.

Alternative in case you dislike typing image so much:

ImageMorph new    image: (Form fromFileNamed: 'C:\Documents and Settings\Mike\My Documents\My Pictures\newavatar.gif');    openInWorld.


(these work from a default install of Squeak)

I'm guessing it will take a little more work in Python, although I could be wrong. Note that I'm not saying don't use Python, I'm just trying to clarify and bring to light some of the advantages of this alternative, specifically those that came to mind when I read "drag-and-drop" (because the ImageMorph created by the above code will be rotatable, moveable, and resizable, all using the mouse, immediately).

[Edited by - MaulingMonkey on August 19, 2005 7:29:46 AM]
Quote:Original post by sunandshadow
Quote:Original post by Oluseyi
Switching gears entirely, you may want to look at something like Erasmotron, sunandshadow.


Oh the Erasmatron, that's cool, but last I checked it was only for Mac, not to mention that it doesn't support 3-D, collision detection, and other rather important things like that. ;) If I was going to use an engine I'd probably pick DarkBasic, but that's not free. I'm leaning toward Java because it's widely used, my roommate's familiar with it so he could help, I hear there are nice toolkits available, and I like it's philosophy of being organized and safe.


Java may be a bit slow for some things (like 3D graphics), but it may not be too noticable (I haven't tried 3D in Java yet). You could use C/C++ to do the lower-level part of the graphics, but the JNI overhead might cancel the performance gain out.
Also, I would recommend that you get (in addition to a Java book or tutorial) a book on OO design patterns (such as "Design Patterns: Elements of Reusable Object-Oriented Software" AKA The Gang of Four book) and maybe bookmark the Portland Pattern Repository's Wiki.
Quote:Original post by thwart
Actually Glak, the latest version of Java, 1.5, brings in the concept of templates in the form of Generics.

Generics are not templates, and vice versa. There is a world of subtle "gotchas" that could wind up coming to bite you. In particular, because Java's implementation of generics relies on the concept of type erasure, there is a substantial performance penalty to using generics on a collection (e.g. List<T>) versus making a specialized collection for each type you want to use (e.g. List<string>).

Many leading software engineers have decried the type erasure practice. See here, or here for why Java says type erasure is a good thing.
- k2"Choose a job you love, and you'll never have to work a day in your life." — Confucius"Logic will get you from A to B. Imagination will get you everywhere." — Albert Einstein"Money is the most egalitarian force in society. It confers power on whoever holds it." — Roger Starr{General Programming Forum FAQ} | {Blog/Journal} | {[email=kkaitan at gmail dot com]e-mail me[/email]} | {excellent webhosting}
Quote:Original post by kSquared
Many leading software engineers have decried the type erasure practice. See here, or here for why Java says type erasure is a good thing.


Are you sure you got that second link right? This quote: "We show that this idiom is provably incorrect and as such it leads to major violations of the Java type system that appear in the new release. The new release thus turns a type safe language into an unsafe one as static type checking does not work any more." makes that second link sound more like saying type erasure bad.
Just thought I would throw my two cents in for D, a high performance C++ like language without many of C++'s hang-ups.

I also have tried Java using LWJGL, and found that performance really isn't a problem, but type-ability certainly is a problem, and vertex arrays and VBO's seem to be a little tricky.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Hello,

I don't understand the argument that Java is too slow for game development. Of course it does not have the raw power that C++ does simply because it is not compiled to native machine code, but Java is more than adequate for 3D game development if used with an OpenGL binding such as LWGL or JOGL. Check out Jake2 or Tribal Trouble for examples. No, these aren't necessarily bleeding edge games, but they are still very well done, great looking, and fast 3D games done in Java. I am not some sort of Java nazi or anything, I just think some comments on how Java isn't suitable for 3D game development are made out of ignorance. Cheers.
Quote:Original post by Isolier
Hello,

I don't understand the argument that Java is too slow for game development. Of course it does not have the raw power that C++ does simply because it is not compiled to native machine code, but Java is more than adequate for 3D game development if used with an OpenGL binding such as LWGL or JOGL. Check out Jake2 or Tribal Trouble for examples. No, these aren't necessarily bleeding edge games, but they are still very well done, great looking, and fast 3D games done in Java. I am not some sort of Java nazi or anything, I just think some comments on how Java isn't suitable for 3D game development are made out of ignorance. Cheers.


I never said it would be too slow, I said it would be slower. I don't have any experience making 3D games with Java, so I can't really say whether it would be too slow or not.

This topic is closed to new replies.

Advertisement