Tags:

หลังมาตรฐาน C++0x ผ่านร่างสุดท้าย การโหวตรอบจริงก็ไม่มีปัญหาอะไรเมื่อคณะกรรมการโหวตด้วยมติเอกฉันท์ให้รับมาตรฐานนี้เข้าเป็นมาตรฐาน ISO/IEC 14882:2011 หรือมาตรฐาน C++ ปรับปรุงครั้งที่สาม และได้ชื่อใหม่เป็น C++11 ตามปีที่ออกมาตรฐานสำเร็จ

หลังจากผ่านมาตรฐานแล้ว สิ่งที่เราต้่องรอกันต่อไปคือคอมไพลเลอร์ต่างๆ จะต้องปรับปรุงความสามารถในรองรับกันจนครบถ้วน ซึ่งคอมไพล์เลอร์หลักๆ เช่น gcc หรือ Visual Studio จะรองรับความสามารถบางส่วนไปก่อนหน้านี้แล้ว แต่ก็ยังต้องรออีกสักพักกว่าจะครบถ้วนกันจริงๆ (ดูตารางเทียบการรองรับ)

หลายคนได้ใช้ C++11 แล้วพบว่าเขียนสั้นลงมากจากฟีเจอร์ auto เท่าที่ผมลองดูพบว่าโค้ดเข้าใจง่ายขึ้นมากอีกด้วย การเรียนการสอนในระดับมหาวิทยาลัยอาจจะน่ากลับมาใช้ C++ อีกครั้ง

ที่มา - Herb Sutter

Comments

By: neizod
ContributorTraineeIn Love
neizod's blog
on 19/08/11 3:00 #323720 toggle
neizod's picture

เขียนสั้นลง -> ประเด็นสำคัญเลยนะเนี่ย ^___^

By: Tg
Tg's blog
on 19/08/11 6:56 #323743 toggle
Tg's picture

ฟังแล้วน่าสนใจแฮะ

แต่ไอ้ฟีเจอร์ออต้อนี่มันทำอะไรเหรอครับ...

By: UltimaWeapon
AndroidUbuntuWindows
UltimaWeapon's blog
on 19/08/11 7:54 #323756 Reply to:323743 toggle
UltimaWeapon's picture

ไว้ประกาศตัวแปรคับ ตัวอย่าง

int x; auto y = x;

y จะเป็นชนิด int


My Facebook My Blog

By: Tg
Tg's blog
on 19/08/11 9:22 #323793 Reply to:323756 toggle
Tg's picture

อ้อ ขอบคุณครับ มันคือ type inference เหรอครับ

ไม่ค่อยชอบเลยครับ...ผมชอบแปะ type ไปตรงๆ เวลาอ่านมันเข้าใจง่ายดี

By: Thaina
Windows
Thaina's blog
on 19/08/11 15:26 #323904 Reply to:323793 toggle
Thaina's picture

ถ้าใช้จนชินแล้วจะสบายขึ้นครับ

ส่วนใหญ่มันใช้กับ object ชื่อยาวๆน่ะครับ อย่าง

var ip = new Dictionary<IPAddress,UserData>()

อะไรแบบนี้


My Blog

By: soginal
Android
soginal's blog
on 19/08/11 22:57 #323980 Reply to:323793 toggle
soginal's picture

ของ .net มันถูกใช้กับ anonnymous type และ linq ด้วยครับ มันเลยจำเป็นต้องมี


  1. "If debugging is the process of removing software bugs, then programming must be the process of putting them in."
  2. "Life like binary tree"
  3. "I need emoticon"
By: iStyle
ContributorAndroidSymbianWindows
iStyle's blog
on 19/08/11 12:33 #323857 Reply to:323756 toggle
iStyle's picture

var นี่เอง


May the Force Close be with you.

By: Diaboros_Sorobaid
Symbian
Diaboros_Sorobaid's blog
on 19/08/11 7:39 #323753 toggle
Diaboros_Sorobaid's picture

C++0x ชื่อเท่จะตาย

By: war11ck
Windows PhoneAndroidSymbianUbuntu
war11ck's blog
on 19/08/11 9:16 #323786 Reply to:323753 toggle
war11ck's picture

+1 ไม่รู้จะเปลี่ยนทำไม

By: toooooooon
iPhoneWindows PhoneAndroidBlackberry
toooooooon's blog
on 19/08/11 9:45 #323799 Reply to:323753 toggle
toooooooon's picture

อ่านว่าอะไรครับ

" ซี พลัส พลัส ซีโร่ เอ๊กซ์ " รึ

แล้วของใหม่หล่ะ

" ซี พลัส พลัส อีเลฟเว่น " ?

By: PiKO
ContributorAndroid
PiKO's blog
on 19/08/11 18:04 #323933 Reply to:323799 toggle
PiKO's picture

C++0x อ่านว่า ซี พลัส พลัส โอ เอ๊กซ์ ("see plus plus oh ex" จาก Wikipedia)


:: DigiKin8 ::

By: Diaboros_Sorobaid
Symbian
Diaboros_Sorobaid's blog
on 19/08/11 22:07 #323974 Reply to:323799 toggle
Diaboros_Sorobaid's picture

ซี พลัส พลัส วัน วัน = วันๆเขียนแต่ซีพลัสพลัส.

By: Thaina
Windows
Thaina's blog
on 19/08/11 22:25 #323976 Reply to:323974 toggle
Thaina's picture

+10


My Blog

By: PiKO
ContributorAndroid
PiKO's blog
on 19/08/11 18:02 #323932 Reply to:323753 toggle
PiKO's picture

ชื่อ C++0x จะเป็นชื่อของรุ่นต่อไปที่ยังไม่ได้เป็นมาตรฐานครับ


:: DigiKin8 ::

By: lew
FounderJusci's WriterMEconomicsAndroid
lew's blog
on 19/08/11 22:58 #323982 Reply to:323932 toggle
lew's picture

C++0x ตั้งไว้เพราะมาตรฐานทำมาหลายปีครับ เคยหวังกันว่ามาตรฐานจะเสร็จก่อนปี 2010 จึงตั้งว่า 0x (ตัว x แปลว่าไม่รู้ว่าปีอะไร) ปรากฏว่ามันเลื่อนมาจนถึงปี 2011 ก็ใช้คำเดิมไปจนมาตรฐานเสร็จ


LewCPE's Google+

By: kanit_wong
kanit_wong's blog
on 19/08/11 9:18 #323787 toggle
kanit_wong's picture

มีใครสรุปแบบอ่านง่ายๆ ไว้บ้างไหมครับ

By: Invisible Force
ContributoriPhoneAndroidUbuntu
Invisible Force's blog
on 19/08/11 11:05 #323839 Reply to:323787 toggle
Invisible Force's picture

ลองเข้าไปอ่านข่าวเก่า จาก Highlight ลิ้งด้านบนสิครับ

(หรือ ลิ้งนี้ครับ http://www.blognone.com/news/22687)

By: nextman13
Ubuntu
nextman13's blog
on 19/08/11 9:58 #323803 toggle
nextman13's picture

ต้นกำเนิดภาษาสร้างนวัฒกรรมใหม่ๆ ใน IT


This is a pen.

By: lunatic
iPhoneWindows PhoneAndroidUbuntu
lunatic's blog
on 19/08/11 9:59 #323805 toggle
lunatic's picture

เคยอ่านผ่านๆเมื่อน๊าน นาน มาแล้ว เห็นว่าเขียน class ไม่ต้องเขียน .h ด้วย ถ้าจำไม่ผิดนะ

By: sathdr
iPhoneAndroidSymbian
sathdr's blog
on 19/08/11 14:02 #323883 Reply to:323805 toggle
sathdr's picture

ถ้าไม่ต้องเขียน .h นี่น่าจะสะดวกขึ้นกว่าเดิมเยอะเลยครับ

By: le-phather
Blackberry
le-phather's blog
on 19/08/11 12:54 #323862 toggle
le-phather's picture

ดีใจจังเลยที่ได้ยินข่าวนี้ จากคนรัก C/C++


THAIBRO Fanpage

By: mr_tawan
ContributoriPhoneAndroidWindows
mr_tawan's blog
on 19/08/11 15:50 #323912 toggle
mr_tawan's picture

เย๊ เย๊ ... เตรียมตัวงานเข้า OTL


By: frozenology
ContributoriPhoneAndroid
frozenology's blog
on 21/08/11 14:18 #324494 toggle
frozenology's picture

เวลาเขียน C++ แล้วหน่ายกับการเขียน .h มากมาย แล้วก็เรื่อง .h ซ้ำซ้อนและตีกัน

แต่ว่ามหาลัยไทยก็ไม่ได้เน้น C++ สักเท่าไร ส่วนมากเน้น C#, VB .net


@fb.me/frozenology @Arang for Gamer