Monday, February 5, 2007

Requirements MUST be strict

To further echo some issues I brought up earlier, I think we need to start rejecting proposed standards that include grammars that are more complicated than required. For example, the SIP RFC is littered with examples like this:

  from-spec   =  ( name-addr / addr-spec )
               *( SEMI from-param )
  from-param  =  tag-param / generic-param
  tag-param   =  "tag" EQUAL token
 
For this example, just pay attention to the *( SEMI from-param ) and its fallout. This is saying that "there can be zero or more "SEMI" followed by a from-param, where an example of a "from-param" is "tag" EQUAL token.

When I first encountered this about 3 years ago I was annoyed, but it has recently become more annoying the more I think about it. The problem is in the definitions of "SEMI" and "EQUAL". They are:

   SEMI    =  SWS ";" SWS ; semicolon
   EQUAL   =  SWS "=" SWS ; equal
 
And "SWS" is:
   LWS  =  [*WSP CRLF] 1*WSP ; linear whitespace
   SWS  =  [LWS] ; sep whitespace
 
So, something as simple as:
  From: sip:me@example.com;tag=12345
 
can be written as:
  From: sip:me@example.com
    ; 
    tag
    =
    12345
 
and are expected to be equivalent.

Am I insane to think that this flexibility in the input is insane and unreasonable? Now, it is not really that hard to parse those to be equivalent, but my question is this. Why make a standard that says that either form is acceptable? Certainly proponents of text-based protocols (and I am not one of them) would argue that it allows you to have better readability in some cases, but I think this type of flexibility is a little too much.

54 comments:

Tim said...

How many times has your second example above actually been used in practice? I'm willing to bet never.

Unnecessary flexibility is a common feature of many libraries as well as standards. It leads to unneeded complexity and unused features. It also leads to less orthogonality and more difficult maintenance. All of these are not desirable library attributes.

bernard n. shull said...

i did a little research after you told me about your "thing", and if you want a way to make more money using your your blog you can enter this site: link. bye.

fengfk2008 said...

中醫減重
中醫減重
中醫減重
中醫減重
中醫減重
花蓮民宿
花蓮民宿
花蓮民宿
花蓮民宿
花蓮民宿
花蓮民宿

宜蘭民宿 said...

NI
批發

seo

網路行銷

fengfk2008 said...

XW
情趣用品

提供上千種成人商品線上購物服務--專營情趣商品、男女自慰用品、性感睡衣、情趣用品批發、自慰套、SM商品、逼真情趣娃娃、跳蛋、按摩棒、同志用品、TENGA飛機杯..,可線上刷卡及貨到付款。 ... 收到的東西會有情趣用品的字樣嗎? 轉帳之後,如何通知這筆款項是我付的
導航

a片
a片
a片
a片
a片
a片

fengfk2008 said...

MOTEL
seo
居家看護
法拍屋
白蟻
seo
隔熱紙
高雄縣旅遊
墾丁旅遊
網路行銷

fengfk2008 said...

簡善琳瑜珈補習班創辦人簡善琳老師,在三十幾年前瑜珈風氣尚未盛行的少女時代即對它產生濃厚興趣少時體質贏弱敏感也因瑜伽而獲得顯著改善,所以立志貢獻所學,藉由瑜珈來達成幫助國人身體健康的願望。高雄瑜珈中簡善琳瑜伽養生會館除了硬體設備在會館環境上建立最精緻、最優質的多功能複式場所外,為避免其他瑜珈教室之師資情況(即投入教學工作則無力再學習進修之窘境),對於師資的培訓與要求更是不遺餘力,所有師資不分資深資淺每個月都要接受新的瑜伽課程訓練,期盼與國際接軌,隨時給予學員最新的資訊與知識。針對初學者教授九大關節操、拜日式、基本功法、淨脈呼吸法等,溫和而緩慢的瑜珈,透過簡單的延展動作及呼吸按摩身體各部位的經脈,奠定初學者學習瑜伽的基礎。會館裡有初級瑜伽、整體瑜伽、哈達瑜伽、養生瑜伽、有氧瑜伽、塑身瑜伽、氣功瑜伽、瑜伽提斯、Ashtanga、孕婦瑜伽、進階瑜伽、體位法瑜伽…等數十項豐富瑜伽課程提供選擇。

fengfk2008 said...

網路行銷
網路行銷
網路行銷
seo
seo
seo

fengfk2008 said...

I wish you health and happiness every day!
Ich wunsche Ihnen Gluck und Gesundheit jeden Tag!
Je vous souhaite sante et bonheur chaque jour!

網路行銷
seo

優質行動網 said...

I am from Taiwan! Si vous voulez visiter Taiwan, bienvenue sur mon site et des visites Zhijiao, je vais proposer divers types de visites guidées et visites guidées ...

I am from Taiwan! If you want to visit Taiwan, welcome to my site visits and Zhijiao, I will provide various guided tours and guided tours .

Ich komme aus Taiwan! Wenn Sie nach Taiwan besuchen möchten, herzlich willkommen auf meiner Besuche vor Ort und Zhijiao, werde ich verschiedene geführte Touren bieten und Führungen ...

高雄旅遊
墾丁旅遊
阿里山旅遊
日月潭旅遊
清境旅遊
包車旅遊
高雄一日遊
墾丁一日遊
台南一日遊
租車旅遊

fengfk2008 said...

隔熱紙-汽車隔熱紙 大樓隔熱紙 3M隔熱紙
3M隔熱紙-大樓隔熱紙 隔熱紙 汽車隔熱紙
汽車隔熱紙-隔熱紙 大樓隔熱紙 3M隔熱紙
大樓隔熱紙-隔熱紙 汽車隔熱紙 3M隔熱紙
隔熱紙常識-隔熱紙 汽車隔熱紙 大樓隔熱紙 3M隔熱紙
隔熱紙常識-隔熱紙 汽車隔熱紙 大樓隔熱紙 3M隔熱紙

公車 said...

Necessity is the mother of invention..........................

假日的 said...

I love readding, and thanks for your artical.........................................

book said...

上來打聲招呼,祝你一切平安!........................................

枝妹 said...

本土性愛自拍圖台灣本土性愛性愛a成人性愛站明星性愛成人dvd下載成人dvd免費看成人go成人go2成人hbo成人kk俱樂部成人人圖成人大全成人片a片成人片gogo成人片gogosex成人卡通色情片白虎圖庫尼可成人網弘爺論壇打非打非機專用網打炮論壇打飛機專區打砲遊戲打砲網站本土付費av本土成人直播本土自拍小弟弟本土性自拍影片85cc聊天室aio交友愛情館成人視訊

林淑凡 said...

天下沒有走不通的路,沒有克服不了的困難,沒有打不敗的敵人。..................................................

PierreJ_Goodell said...

Hello~Nice to meet you~..................................................

ToryB_He231147 said...

你可以從外表的美來評論一朵花或一隻蝴蝶,但你不能這樣來評論一個人........................................

LonnyAa1105podac said...

想要推動天下,先要發動自己。.........................

ThurmanSartor佑英 said...

謝謝您的分享~感恩唷!!..................................................

美書 said...

本土天堂自拍台灣夫妻自拍做愛自拍照片打炮自拍貼圖夫妻自拍片免費線上直播片銀赫歐美av線上歐美av線上看歐美女自慰歐美成人女星歐美成人片女星歐美成人免費線上歐美成人情色歐美色情圖貼歐美免費成人電影歐美免費成人影片觀看歐美免費自拍歐美免費做愛片歐美免費情色影片模特兒平台標題樣?嫚雪兒免費小說影片avi影片a直播影片下?影片分享fuck影片成人片影片成人免費凹凸色色卡通圖片免費即時通視訊成人論壇巨乳

姿婷 said...

haha~ funny! thank you for your share~ ........................................

韋于倫成 said...

一時的錯誤不算什麼,錯而不改才是一生中永遠且最大的錯誤...............................................................

淑慧 said...

亞洲東洋影片go2av 18美女成人網 UT視訊美女交友 A片 - A片-情色網 免費視訊聊天fairy 情人080百分百成人圖片 影音聊天fm358 美女交友artdab 熟女人影片 制服淫窟 嘟嘟情人色網 utshow 視訊聊天 獸皇影片分享區 104av成人音影城 後宮視訊交友 sex520貼片,日本av女優,色美眉,sex,成人 免費線上影片觀看 洪爺護士免費 aa 片 173liveshow 視訊美女 0401成人聊天室 utobe影片 hichannel免費影視 情色視訊影音聊天 人之初貼圖區 plus論壇玩美女人影音秀 85cc情人影城 UT影音視訊聊天室 援交友留言 avonline免費a片 85cc免費av影片 情色免費成人avdvd電影 A片-殺很大 檳榔西施摸奶圖片 成人情色,性愛自拍 亞洲藝人情人視訊網 fdz論壇 情人視訊網 d736 uthome 視訊聊天室 sex888入口情色小遊戲 後宮 視訊聊天 免費視訊辣妹情人視訊網 kk俱樂部wmti 無碼dvd一本道a片 視訊美女 視訊ggo 素人自拍et免費影片下載 hilive-免費視訊 a383girl影音 45avdvd免費影片 免費視訊聊天fm358

HaroldM22 said...

從人生中拿走友誼,猶如從生活中移走陽光 ............................................................

伯臻伯臻 said...

果然很有意思呀....這當然要頂一頂呀 ̄﹏ ̄........................................

ShilaLong嘉雯 said...

Knowledge is a treasure, but practice is the key to it.............................................................

祥傑祥傑 said...

you have a very successful business............................................................

asda said...

謝謝您囉~~很好的經驗分享!..............................

Kath黃rinA俊宇 said...

目標是什麼不重要,目標能產生什麼樣的效果才重要......................................................................

sada said...

休息才能再次出發-隨時保持好體力-加油.................................................................

江婷 said...

喜歡你的部落格,留言請您繼續加油.................................................................

郁雨郁雨 said...

一個人的價值,應該看他貢獻了什麼,而不是他取得了什麼....................................................................

靜宸靜宸 said...

向著星球長驅直進的人,反比踟躕在峽路上的人,更容易達到目的。............................................................

吳婷婷 said...

向著星球長驅直進的人,反比踟躕在峽路上的人,更容易達到目的。............................................................

琇白 said...

天下沒有意把鑰匙,可以打開所有的門............................................................

育隆 said...

心平氣和~祝你也快樂~~..................................................................

陳韋夏陳韋夏益東富益東富 said...

很喜歡看看別人的生活故事,謝謝您的分享哦~~............................................................

芸茂芸茂 said...

單純喜歡你的部落格 留個言跟您問聲好~~............................................................

韋志韋志 said...

才華在逆境中展現,在順境中被掩藏。..................................................................

王美妹 said...

來塊巧克力吧~~心情會好哦~~............................................................

群學群學 said...

知識可以傳授,智慧卻不行。每個人必須成為他自己。. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

魏江伶魏江伶 said...

等很久了 謝謝你的用心............................................................

陳陳廖淑娟詩蓁俊偉 said...

人若賺得全世界,賠上自己的靈魂,有什麼益處?......................................................

小袁璇 said...

I do like ur article~!!!..................................................................

凱許倫 said...

道歉是人類一定必要的禮節..................................................

謝俊林奕宏宏 said...

堅持是為著某種目的或目標,而持續不斷朝向既定方向努力的一種意念。..................................................

储涵 said...

If you lend someone $20 and never see that person again, it was probably worth it...................................................................

筱陳婷 said...

在你一無所有的時候 是誰在陪伴你 他便是你最重要的人......................................................................

麗王王珠 said...

友誼能增進快樂,減少痛苦......................................................................

淑芳 said...

謝謝您的分享~~好文值得收藏!!..................................................................

玉韓韓韓婷韓韓韓韓 said...

時間就是塑造生命的材料。..................................................... ............

王綺廖家堯廖家堯穎 said...

笑口常開~~天天開心............................................................

王怡迪 said...

培養健全孩子最好的方法是父母先成為健全的人。......................................................................