Thread Rating:
  • 369 Vote(s) - 2.79 Average
  • 1
  • 2
  • 3
  • 4
  • 5
#t , any , Type の違いは?
09-14-2013, 11:31 AM,
#3
RE: #t , any , Type の違いは?
#t means that the template will substitute in the nullable version of type 't' which you specified when you instantiate the template. (E.g. this is means that if you ask for {DisplayFrame-of String} that field will be #String. For non-class types there is no # variant (#int == int).)

This is different from using 'any' in that the field or argument will be of the specified type, attempting to pass other types will cause a compilation error, and the storage will be the size of that type, and math operators will be natively compiled in the right type. (Note that you could do {DisplayFrame-of any} and lose all of those benefits, but it might be suitable in some cases.)

Type means any type can be used, ClassType means that it must be a subclass of Object (anything defined with define-class.) (Type also includes value types and basic types like int.)

Reply


Messages In This Thread
#t , any , Type の違いは? - by umemura - 09-10-2013, 06:02 PM
RE: #t , any , Type の違いは? - by wbardwell - 09-14-2013, 11:31 AM
RE: #t , any , Type の違いは? - by umemura - 09-17-2013, 08:05 PM

Possibly Related Threads...
Thread Author Replies Views Last Post
  type-switch で Array-of 、HashTable-of を判別したい umemura 2 3,824 12-28-2012, 01:39 PM
Last Post: wbardwell
Forum Jump:


Users browsing this thread:
1 Guest(s)

MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1017 - Can't find file: 'mybb_threadviews' (errno: 2)
Query:
INSERT INTO mybb_threadviews (tid) VALUES('966')