diff website/src/diff.html.luan @ 1813:fa0e73119b7c

docs work
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 10 Jun 2024 23:19:40 -0600
parents f44dcb3fedf7
children 0ead5c6b07b0
line wrap: on
line diff
--- a/website/src/diff.html.luan	Mon Jun 10 14:41:48 2024 -0600
+++ b/website/src/diff.html.luan	Mon Jun 10 23:19:40 2024 -0600
@@ -27,7 +27,7 @@
 				title = "Values and Types"
 				content = function()
 %>
-<p>Luan does not have the Lua <em>thread</em> type.  Luan adds a <em>binary</em> type that Lua doesn't have.  This is because Lua strings can represent binary while Luan strings cannot.</p>
+<p>Luan adds a <em>binary</em> type that Lua doesn't have.  This is because Lua strings can represent binary while Luan strings cannot.</p>
 
 <p>The Luan <em>Nil</em> type is implemented as the Java <em>null</em>.  The Luan <em>Boolean</em> type is implemented as the Java <em>Boolean</em> type.  The Luan <em>Number</em> type is implemented as the Java <em>Number</em> type.  The Luan <em>String</em> type is implemented as the Java <em>String</em> type.  Actual numbers may be any subclass of the Java <em>Number</em> class.</p>
 
@@ -38,6 +38,8 @@
 <p>The Luan <em>binary</em> type is the Java <em>byte[ ]</em> type which is an array of bytes.</p>
 
 <p>The Luan <em>table</em> type is just like its Lua equivalent, but implemented in Java.</p>
+
+<p>Luan does not have the Lua <em>thread</em> type which aren't actually threads but in fact are coroutines.  Luan has real threads.  This is particularly valuable for web serving where each request is handled by a thread.  But thread synchronization is too complicated for application programmers.  So Luan makes objects (tables) immutable when they become accessible by multiple threads.  This eliminates the need for thread synchronization.  If there is a need to share mutable state across threads, there are special thread-local functions for this.</p>
 <%
 				end
 			}