瀏覽代碼

Revised documentation page on differences with other Smalltalks.

Göran Krampe 13 年之前
父節點
當前提交
b3afb4fb78
共有 3 個文件被更改,包括 15 次插入9 次删除
  1. 0 1
      js/Documentation.deploy.js
  2. 0 1
      js/Documentation.js
  3. 15 7
      st/Documentation.st

文件差異過大導致無法顯示
+ 0 - 1
js/Documentation.deploy.js


文件差異過大導致無法顯示
+ 0 - 1
js/Documentation.js


+ 15 - 7
st/Documentation.st

@@ -73,13 +73,21 @@ ch2differencesWithOtherSmalltalks
 	^DocChapter new
 		title: 'Differences with other Smalltalks';
 		contents: '
-Amber has some differences with other Smalltalk implementations. 
-Because it maps Smalltalk constructs one-to-one with the JavaScript equivalent, including Smalltalk classes to JavaScript constructors, the core class library is simplified compared to Pharo Smalltalk. 
-The following list explains the main differences:
-
-- The collection class hierarchy is simpler compared to most Smalltalk implementations. As of today, there is no SortedCollection. The size of arrays is dynamic, and they behave like an ordered collection. 
-  They can also be sorted with the #sort* methods.
-- The Date class behaves like the Date and TimeStamp classes in Pharo Smalltalk. Therefore both Date today and Date now are valid in Amber.
+Amber has some differences with other Smalltalk implementations. This makes porting code a non-trivial thing, but still quite manageable.
+Because it maps Smalltalk constructs one-to-one with the JavaScript equivalent, including Smalltalk classes to JavaScript constructors, the core class library is simplified compared to Pharo Smalltalk.
+And since we want Amber to be useful in building lean browser apps we can''t let it bloat too much.
+
+But apart from missing things other Smalltalks may have, there are also things that are plain different:
+
+- The collection class hierarchy is much simpler compared to most Smalltalk implementations.
+- As of today, there is no SortedCollection. The size of arrays is dynamic, and they behave like an ordered collection. They can also be sorted with the `#sort*` methods.
+- The `Date` class behaves like the `Date` and `TimeStamp` classes in Pharo Smalltalk. Therefore both `Date today` and `Date now` are valid in Amber.
+- Amber does not have class Character, but `String` does implement some of Character behavior.
+- Amber does support class instance variables, but not class variables.
+- Amber only has global classes and packages, but not arbitrary objects. Use classes instead like `Smalltalk current` instead of `Smalltalk` etc.
+- Amber does not support pool dictionaries.
+- Amber uses **< ...javascript code... >** to inline JavaScript code and does not have pragmas.
+- Amber does not have class categories. The left side in the browser lists real Packages, but they feel much the same.
 '
 !
 

部分文件因文件數量過多而無法顯示