哪些語言允許在標識符中使用空格?哪些語言允許在標識符中使用空格?
實施例:
int current index = 5
string body = fetch article(current index)
哪些語言允許在標識符中使用空格?哪些語言允許在標識符中使用空格?
實施例:
int current index = 5
string body = fetch article(current index)
與空白的問題,是它經常被用來作爲標記之間的分隔符。所以如果你允許空格,你必須將幾個標記合併爲一個。
但這不是不可能的。沒有其他標記的兩個標識符很少見,因此您可以採用編譯器來接受此標記。
在另一方面,你可以得到讀取硬盤代碼:
int current index = 5
int current /* in between comment */ index = 5
int current
index = 5
所以我不認爲優勢擊敗缺點。
MSSQL,MSACCESS和Oracle,如果你引用標識符正確(使用[]或 「」 分別)
FORTRAN,這是一個不好的設計決策。
例如,用a替換a。可以將DO循環轉換爲分配。
我們剛剛在我的課程中談到了這個着名的錯誤 http://en.wikipedia.org/wiki/Mariner_1#Or_was_it_the_most_expensive_decimal_point.3F – 2009-10-18 03:19:37
我不喜歡這種語言:) – ufukgun 2009-07-28 11:28:53
如何處理空白語言,一切都寫在空白! – Matt 2009-08-04 22:01:46
http://en.wikipedia.org/wiki/Whitespace_%28programming_language%29 – Matt 2009-08-04 22:02:24