I don't need to test my programs. I have an error-correcting modem.

Difference between revisions of "Talk:UnrealScript compared with other languages"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
m
Line 6: Line 6:
  
 
:In fact, the package system in UnrealScript is very explicit: a class belongs to the package it was declared in. Classes with identical names in different packages are discouraged, but possible. If you ignore this convention, you pay by potentially not being able to use typecasting as you wanted. Java does support boolean arrays, it's just usually more common to use a BitSet object due to its better memory usage. —[[User:Wormbo|Wormbo]] 12:32, 10 May 2009 (UTC)
 
:In fact, the package system in UnrealScript is very explicit: a class belongs to the package it was declared in. Classes with identical names in different packages are discouraged, but possible. If you ignore this convention, you pay by potentially not being able to use typecasting as you wanted. Java does support boolean arrays, it's just usually more common to use a BitSet object due to its better memory usage. —[[User:Wormbo|Wormbo]] 12:32, 10 May 2009 (UTC)
::Having classes with the same name can be problematic, especially when you're trying to override gametypes that share a common set of classes. This kind of forces you to rewrite eveything since classes are probably accessed on a first in line basis. In Java it's possible to access classes using the package.class notation. Thanks for the information concerning booleans. --[[Special:Contributions/77.109.96.176|77.109.96.176]] 16:29, 22 May 2009 (UTC)
+
::Having classes with the same name can be problematic, especially when you're trying to override gametypes that share a common set of classes. This kind of forces you to rewrite eveything since classes are probably accessed on a first in line basis. In Java it's possible to access classes using the package.class notation. Thanks for the information concerning booleans. --[[User:Azura|Azura]] 16:30, 22 May 2009 (UTC)

Revision as of 10:30, 22 May 2009

Java

  • The language probably doesn't support arrays of booleans either. Instead arrays of bytes are usually used.
  • The packages system in unrealscript is more awkward: you can't explicitely define to what package a class belongs which can lead to some ambiguities.
  • Java uses boxing/unboxing to translate primitive data types (string, integer...) to their corresponding object forms when necessary.
In fact, the package system in UnrealScript is very explicit: a class belongs to the package it was declared in. Classes with identical names in different packages are discouraged, but possible. If you ignore this convention, you pay by potentially not being able to use typecasting as you wanted. Java does support boolean arrays, it's just usually more common to use a BitSet object due to its better memory usage. —Wormbo 12:32, 10 May 2009 (UTC)
Having classes with the same name can be problematic, especially when you're trying to override gametypes that share a common set of classes. This kind of forces you to rewrite eveything since classes are probably accessed on a first in line basis. In Java it's possible to access classes using the package.class notation. Thanks for the information concerning booleans. --Azura 16:30, 22 May 2009 (UTC)