分析器標籤用來辨識一個解答是_如何_解出來的。
這些標籤接著可以用來:
標籤是一個格式如下的字串:<category>:<thing>。
我們支援四種不同的分類,由最高層級排到最低層級:
| 分類 | 說明 | 具體程度 | 範例 |
|---|---|---|---|
paradigm |
程式設計典範 | 非常高的層級,不特定於 track |
imperative, functional
|
technique |
所使用的技巧 | 高層級,多數不會特定於 track |
recursion, immutability
|
construct |
語言構造 | 許多不會特定於 track |
bitwise-and, for-loop
|
uses |
語言特定的用法,例如型別或方法 | 低層級,特定於 track |
DateTime.add_seconds, IEnumerable
|
一些範例標籤:
paradigm:functionaltechnique:recursionconstruct:bitwise-anduses:DateTime.add_seconds雖然每個 track 都可以自由地為解答標上他們認為合適的標籤,我們仍建議盡量使用下面這份常用標籤清單。 使用一組共通的標籤,能讓我們做出一些很酷的功能,例如跨 track 連結解答。
| 標籤 | 說明 |
|---|---|
paradigm:array |
使用陣列程式設計。 |
paradigm:declarative |
使用宣告式程式設計。 |
paradigm:functional |
使用函式程式設計。 |
paradigm:generic |
使用泛型程式設計。 |
paradigm:imperative |
使用指令式程式設計。 |
paradigm:logic |
使用邏輯程式設計。 |
paradigm:meta |
使用超程式設計。 |
paradigm:object-oriented |
使用物件導向程式設計。 |
paradigm:procedural |
使用程序式程式設計。 |
paradigm:reflective |
使用反射式程式設計。 |
paradigm:stack-oriented |
使用堆疊導向程式設計。 |
| 標籤 | 說明 |
|---|---|
technique:bit-manipulation |
操作位元,通常透過位元運算子(例如 AND、XOR 或左移) |
technique:bit-shifting |
對數字中的位元進行移位 |
technique:boolean-logic |
執行布林邏輯(AND、OR、NOT) |
technique:composition |
使用組合 |
technique:concurrency |
並行執行程式碼 |
technique:enumeration |
對值進行列舉 |
technique:error-handling |
處理錯誤 |
technique:exceptions |
捕捉或拋出例外 |
technique:function-composition |
使用函式合成 |
technique:generator |
使用產生器 |
technique:higher-order-functions |
使用高階函式 |
technique:immutability |
使用不可變性 |
technique:immutable-collection |
使用內容不可變的集合 |
technique:inheritance |
使用繼承 |
technique:laziness |
延遲產生值,只在需要時才產生 |
technique:locks |
使用鎖來取得資源的獨佔存取權 |
technique:looping |
使用迴圈 |
technique:math |
使用數學 |
technique:memory-management |
管理記憶體 |
technique:ordering |
決定資料的順序 |
technique:parallelism |
平行執行程式碼 |
technique:parser |
解析資料 |
technique:pointers |
使用指標 |
technique:randomness |
使用隨機性 |
technique:recursion |
使用遞迴 |
technique:regular-expression |
使用正規表示式 |
technique:short-circuiting |
使用短路求值來避免不必要的計算 |
technique:sorted-collection |
使用元素始終保持排序的集合 |
technique:sorting |
對資料排序 |
technique:tail-call-optimization |
使用尾呼叫最佳化來達成高效率的遞迴 |
technique:type-conversion |
將值從一種型別轉換成另一種型別 |
technique:unsafe |
使用不安全的程式碼(例如指標運算) |
| 標籤 | 說明 |
|---|---|
construct:abstract-class |
定義抽象類別 |
construct:abstract-method |
定義抽象方法 |
construct:add-assignment |
將加法與賦值合併 |
construct:add |
使用加法 |
construct:array |
使用或宣告陣列 |
construct:assignment |
將值指定或綁定到變數/名稱 |
construct:async-await |
使用async/await
|
construct:attribute |
為成員標註中繼資料 |
construct:auto-implemented-property |
定義自動實作的屬性 |
construct:big-integer |
使用大整數 |
construct:binary-number |
以二進位標記法定義數字 |
construct:bit-array |
使用或宣告位元陣列 |
construct:bitwise-and-assignment |
將位元 AND 與賦值合併 |
construct:bitwise-and |
執行位元 AND |
construct:bitwise-left-shift-assignment |
將位元左移與賦值合併 |
construct:bitwise-left-shift |
執行位元左移 |
construct:bitwise-not |
執行位元 NOT |
construct:bitwise-or-assignment |
將位元 OR 與賦值合併 |
construct:bitwise-or |
執行位元 OR |
construct:bitwise-right-shift-assignment |
將位元右移與賦值合併 |
construct:bitwise-right-shift |
執行位元右移 |
construct:bitwise-xor-assignment |
將位元 XOR 與賦值合併 |
construct:bitwise-xor |
執行位元 XOR |
construct:block |
定義包含一連串敘述的區塊 |
construct:boolean |
定義或使用布林值 |
construct:boxing |
使用裝箱 |
construct:break |
跳出迴圈 |
construct:byte |
使用 8 位元無號整數 |
construct:catch |
捕捉例外 |
construct:char |
使用字元 |
construct:checked-arithmetic |
使用檢查式算術(可防止溢位) |
construct:class |
定義類別 |
construct:collection-initializer |
透過初始化器設定集合的值 |
construct:command |
定義命令 |
construct:comment |
定義註解 |
construct:comparison-chaining |
串連比較呼叫 |
construct:comparison |
比較兩個值的相對順序 |
construct:complex-number |
使用複數 |
construct:computed-string |
定義計算出來的字串 |
construct:concatenation |
串接值 |
construct:conditional-access |
有條件地存取方法 |
construct:conditional-operator |
使用三元條件運算子 |
construct:conditional |
有條件地執行程式碼 |
construct:constant |
定義常數(不可變)值 |
construct:constructor |
定義建構函式 |
construct:continue |
繼續進行迴圈的下一次疊代 |
construct:conversion-operator |
定義轉換運算子 |
construct:copy |
複製值 |
construct:coroutine |
定義或使用協程 |
construct:custom-attribute |
定義自訂特性 |
construct:date-time |
使用同時代表日期與時間的值 |
construct:date |
使用代表日期的值(不含時間) |
construct:decimal |
使用 128 位元浮點數 |
construct:decrement |
將值遞減 |
construct:default-interface-implementation |
在介面中定義預設實作 |
construct:default |
定義預設值(例如用於參數) |
construct:destructuring |
將值解構為各個部分 |
construct:dictionary-comprehension |
透過推導式建立字典 |
construct:dictionary |
使用/定義字典/映射 |
construct:discard |
使用特殊的捨棄值 |
construct:divide-assignment |
將除法與賦值合併 |
construct:divide |
使用除法 |
construct:do-while-loop |
使用do-while迴圈 |
construct:double |
使用 64 位元浮點數 |
construct:else |
定義 else 分支 |
construct:enum |
定義或使用列舉(值的列舉) |
construct:equality |
比較兩個值是否相等 |
construct:error |
定義或使用錯誤 |
construct:event |
定義或使用事件 |
construct:exception |
定義或使用例外 |
construct:explicit-conversion |
明確地將一種型別轉換成另一種型別 |
construct:explicit-import |
只匯入特定的功能 |
construct:exponentiation |
計算值的冪次 |
construct:expression-bodied-member |
定義以運算式為主體的成員 |
construct:extension-method |
定義擴充方法 |
construct:field-access |
存取欄位 |
construct:field |
定義欄位 |
construct:finally |
使用 finally 確保特定程式區塊一律會執行 |
construct:flags-enum |
定義或使用旗標列舉 |
construct:float |
使用 32 位元浮點數 |
construct:floating-point-number |
使用浮點數 |
construct:for-loop |
使用for迴圈 |
construct:foreach |
使用foreach迴圈 |
construct:function-overloading |
使用函式多載 |
construct:function |
定義函式 |
construct:generator |
定義產生器函式或方法 |
construct:generic-function |
定義以一個或多個型別參數化的函式 |
construct:generic-method |
定義以一個或多個型別參數化的方法 |
construct:generic-type |
定義以一個或多個型別參數化的型別 |
construct:getter |
定義取值函式 |
construct:global-function |
定義全域可用的函式 |
construct:global-variable |
定義全域可用的變數 |
construct:header |
定義標頭檔 |
construct:hexadecimal-number |
以十六進位標記法定義數字 |
construct:if |
使用if敘述 |
construct:implicit-conversion |
隱含地將一種型別轉換成另一種型別 |
construct:implicit-loop |
隱含地對一組值進行迴圈 |
construct:implicit-return |
隱含地回傳值 |
construct:import |
匯入在別處實作的功能(例如來自命名空間/模組) |
construct:increment |
將值遞增 |
construct:index-operator |
定義用於索引物件的運算子 |
construct:indexer |
定義或使用索引子 |
construct:indexing |
依索引存取值 |
construct:inequality |
比較兩個值是否不相等 |
construct:infix-operator |
定義中置運算子 |
construct:initialization |
在建立後初始化物件 |
construct:initializer-list |
初始化物件欄位的值 |
construct:initializer |
初始化物件 |
construct:instance |
建立或使用型別的執行個體 |
construct:instantiation |
建立型別的執行個體 |
construct:int |
使用 32 位元有號整數 |
construct:integral-number |
使用整數 |
construct:interface |
定義介面 |
construct:invocation |
呼叫方法/函式 |
construct:iterator |
定義可被疊代的函式或方法 |
construct:jagged-array |
使用不規則陣列(由陣列組成的陣列) |
construct:lambda |
定義 lambda(又稱「匿名函式」) |
construct:linked-list |
使用鏈結串列 |
construct:linq |
使用 LINQ |
construct:list-comprehension |
透過推導式建構陣列 |
construct:list |
使用陣列 |
construct:local-function |
定義區域函式 |
construct:local-variable |
定義區域變數 |
construct:lock |
使用鎖 |
construct:logical-and |
執行邏輯 AND |
construct:logical-not |
執行邏輯 NOT |
construct:logical-or |
執行邏輯 OR |
construct:long |
使用 64 位元有號整數 |
construct:loop |
定義迴圈 |
construct:macro |
定義巨集 |
construct:membership-test |
測試某個值是否屬於另一個值 |
construct:metatable |
定義中繼表 |
construct:method-chaining |
串連多個方法呼叫 |
construct:method-overloading |
使用方法多載 |
construct:method-override |
定義被覆寫的方法 |
construct:method |
定義方法 |
construct:module |
定義模組(程式碼的分組) |
construct:modulo-assignment |
將除法餘數與賦值合併 |
construct:modulo |
使用除法餘數 |
construct:multi-dimensional-array |
使用多維陣列 |
construct:multiline-string |
定義多行字串 |
construct:multiple-assignment |
一次指定多個值 |
construct:multiple-dispatch |
使用多重分派 |
construct:multiply-assignment |
將乘法與賦值合併 |
construct:multiply |
使用乘法 |
construct:named-argument |
依名稱傳入引數 |
construct:namespace |
定義命名空間(程式碼的分組) |
construct:nested-function |
定義巢狀函式 |
construct:nested-type |
定義巢狀型別 |
construct:nesting |
使用巢狀結構 |
construct:nint |
使用平台特定的有號整數(32 或 64 位元) |
construct:nuint |
使用平台特定的無號整數(32 或 64 位元) |
construct:null |
使用 null/nil 表示值不存在 |
construct:nullability |
處理 null/nil 值 |
construct:number |
使用數字(有號或無號) |
construct:object-initializer |
透過初始化器設定物件的值 |
construct:octal-number |
以八進位標記法定義數字 |
construct:operator-overloading |
使用運算子多載 |
construct:option |
使用選項型別 |
construct:optional-parameter |
定義選擇性參數 |
construct:overflow |
使用算術溢位 |
construct:parameter |
定義參數 |
construct:parenthesized-expression |
將運算式包在括號中 |
construct:pattern-matching |
使用模式比對 |
construct:pattern |
定義用於模式比對的模式 |
construct:pipe-backward |
使用反向管線 |
construct:pipe-forward |
使用正向管線 |
construct:pipeline |
定義管線 |
construct:point-free |
定義不提及所操作引數的函式 |
construct:pointer |
使用指標 |
construct:postfix-decrement |
使用後置標記法將值遞減 |
construct:postfix-increment |
使用後置標記法將值遞增 |
construct:prefix-decrement |
使用前置標記法將值遞減 |
construct:prefix-increment |
使用前置標記法將值遞增 |
construct:print |
將值印到主控台 |
construct:property |
定義屬性(取值函式/設定函式) |
construct:query-expression |
透過運算式查詢資料 |
construct:queue |
使用佇列 |
construct:range |
定義範圍 |
construct:read-only |
定義唯讀值 |
construct:record |
定義記錄 |
construct:regular-expression |
定義或使用正規表示式 |
construct:result |
使用結果型別 |
construct:return-type |
定義函式或方法的回傳型別 |
construct:return |
從函式/方法回傳 |
construct:sbyte |
使用 8 位元有號整數 |
construct:scientific-notation-number |
以科學標記法定義數字 |
construct:set-comprehension |
透過推導式建立集合 |
construct:set |
使用集合 |
construct:setter |
定義設定函式 |
construct:short |
使用 16 位元有號整數 |
construct:slice |
使用切片 |
construct:stack |
使用堆疊 |
construct:static-field |
定義靜態欄位 |
construct:static-method |
定義靜態方法 |
construct:string-formatting |
透過格式字串建構字串 |
construct:string-interpolation |
定義內插字串 |
construct:string |
定義字串 |
construct:struct |
定義結構 |
construct:subtract-assignment |
將減法與賦值合併 |
construct:subtract |
使用減法 |
construct:sum-type |
定義和型別 |
construct:switch |
使用switch
|
construct:table |
定義表格 |
construct:template-alias |
定義範本的別名 |
construct:template-parameter |
定義範本參數 |
construct:template |
定義範本 |
construct:throw |
拋出例外 |
construct:time |
使用代表時間的物件 |
construct:try |
明確地處理例外 |
construct:tuple |
使用元組 |
construct:type-alias |
定義型別的別名 |
construct:type-conversion |
將值轉換(強制轉型)成另一種型別 |
construct:type-extension |
以新功能擴充型別 |
construct:type-inference |
自動推斷值/函式的型別 |
construct:type-test |
測試值是否為特定型別 |
construct:uint |
使用 32 位元無號整數 |
construct:ulong |
使用 64 位元無號整數 |
construct:unary-minus |
使用一元負號 |
construct:unary-plus |
使用一元正號 |
construct:underscored-number |
使用以底線作為數字分隔符號的數字 |
construct:union-type |
定義聯集型別 |
construct:user-defined-exception |
定義自訂的、使用者定義的例外 |
construct:ushort |
使用 16 位元無號整數 |
construct:using-directive |
使用來自另一個檔案的程式碼 |
construct:using-statement |
透過 using 敘述指定並處置值 |
construct:varargs |
定義支援傳入零個或多個值的參數 |
construct:variable |
宣告變數 |
construct:vector |
使用向量 |
construct:verbatim-string |
使用逐字字串(不含跳脫序列) |
construct:virtual-method |
定義虛擬方法 |
construct:visibility-modifiers |
指定某個構造的可見性(例如方法或類別) |
construct:while-loop |
使用while迴圈 |
construct:yield |
在迴圈中延遲產生值 |
由於這個分類是語言特定的,這裡沒有常用標籤。