View Single Post
  #4   Spotlight this post!  
Unread 15-06-2010, 10:46
buchanan buchanan is offline
Registered User
FRC #2077 (Laser Robotics)
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2007
Location: Wales, WI
Posts: 66
buchanan is just really nicebuchanan is just really nicebuchanan is just really nicebuchanan is just really nice
Re: Non Strict Variables

I don't see anything here that couldn't be translated pretty much directly to Java:
  • The various data types become classes: structs become new classes, double, int, etc become Double, Integer...
  • In the value class, the void* becomes Object, the enum type becomes Class, the value* becomes an object reference to the parent instance of the same class.
  • Casts, methods, etc stay almost the way they are.
  • Mallocs become new Whatever, frees go away.
This would look very odd in Java, and one suspects the problem being solved, whatever it is, could be addressed in a more idiomatic way (interfaces, as mentioned, come to mind), but unless I'm missing something the code could be ported almost as is.
Reply With Quote