Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

FUCKING JAVA

Name: Anonymous 2010-03-31 21:23

Now, I have to write a crossword solver using Java for an AI class - no problem, right?
...until you factor in FUCKING JAVA.

First, I created an arraylist of constraint objects - now there are only 16 of them on the example I'm running, and it just holds something like four integers. Then I get OUT OF HEAP MEMORY or some gay shit error like that, after swearing at the automatic garbage collection and calling it manually I saw that it didn't help, and then I thought I shouldn't have used a faggy arraylist in the first place - so I make an array.

I use a set of 36 to ensure it fits but I get an out of bounds index error
huh
I increase array size to 90
same error
reduce to 17
same error

WHAT THE FUCK

JAVA SHOULD DIE IN A FUCKING FIRE

Name: Anonymous 2010-04-02 20:02

>>29
If a certain language feature would save you a lot of time when implementing some abstraction, then it does mean that in that certain language, certain classes of problems are easier to solve.

Of course, if the language is turing complete, you can make a compiler or interpreter for any language you choose and you won't be constrained by anything in that way, but that doesn't mean the language is suitable for writing the application entirely in it.

Here's a rather extreme example:
Would you rather code in Brainfuck, or would you rather make a ``insert your favorite language''->..->brainfuck compiler, and then code in your favorite language?

That example is a bit extreme, but no one can claim that C has all the features you'd want for any kind of high-level coding. If you're involving another compiler/interpreter here to elevate your language to something better, than you're no longer programming in pure C, but that's what abstraction is about - it's also about extending one's language. There's no language which is perfect for any problem, but the more extensible it is, the easier it is to extend the language to a domain more closer to your problem (which is one way to abstract), and eventually solve your problem.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List