Log in

No account? Create an account

Previous Entry | Next Entry

Languages that enforce data types can suck my nuts.

public boolean javaCanSuckMyNuts() {
     return True;


( 3 comments — Leave a comment )
Apr. 5th, 2005 06:15 am (UTC)

A Java advocate would probably argue that by wanting to do that you are clearly using the wrong approach to solving your problem. Java advocates are like that, you see.

Using typeless and runtime-typed languages tends to make us want to do all sorts of weird things, but there'll be a more Java-ish way to write it. Remember, in Java There Is Only One True Way To Do It. (TIOTWTDT)

Apr. 5th, 2005 11:59 am (UTC)
Was an excercise for a class. Had to define a few classes to store DMV records. In this case I was dealing with the Vehicle class. Had about 10 attributes of varying datatypes that in reality would all be accessed at once to do something like display the data. Thus wanted to just return an associative array of them.
Apr. 5th, 2005 06:11 pm (UTC)

I think “the Java way” to solve that problem would be to return an instance of some class. A class basically is, after all, an associative array of different kinds of values, albeit with the members/types fixed at compile time.

Dynamic languages are much nicer, though, I agree.

( 3 comments — Leave a comment )