റസ്റ്റ് (പ്രോഗ്രാമിംഗ് ഭാഷ)

പ്രോഗ്രാമിങ് ഭാഷ
(Rust (programming language) എന്ന താളിൽ നിന്നും തിരിച്ചുവിട്ടതു പ്രകാരം)

സുരക്ഷയെ കേന്ദ്രീകരിച്ചുള്ള ഒരു മൾട്ടി-പാരഡിഗം സിസ്റ്റം പ്രോഗ്രാമിംഗ് ഭാഷയാണ് റസ്റ്റ്[6], പ്രത്യേകിച്ച് സുരക്ഷിതമായ കൺകറൻസി[7][8]. റസ്റ്റ് സി++ന് സമാനമാണ്, പക്ഷേ ഉയർന്ന പ്രകടനം നിലനിർത്തിക്കൊണ്ട് മികച്ച മെമ്മറി സുരക്ഷ നൽകുന്നതിനാണ് ഇത് രൂപകൽപ്പന ചെയ്തിരിക്കുന്നത്[9].

റസ്റ്റ്
പുറത്തുവന്ന വർഷം:ജൂലൈ 7, 2010; 13 വർഷങ്ങൾക്ക് മുമ്പ് (2010-07-07)
രൂപകൽപ്പന ചെയ്തത്:Graydon Hoare
വികസിപ്പിച്ചത്:The Rust Project
ഡാറ്റാടൈപ്പ് ചിട്ട:Inferred, linear, nominal, static, strong
സ്വാധീനിച്ചത്:Crystal, Elm,[1] Idris,[2] Spark,[3] Swift[4]
അനുവാദപത്രം:MIT or Apache 2.0[5]
വെബ് വിലാസം:www.rust-lang.org

ഡേവ് ഹെർമൻ, ബ്രണ്ടൻ ഐക്ക്, എന്നിവരിൽ നിന്നുള്ള സംഭാവനകളോടെയാണ് മോസില്ല റിസർച്ചിലെ ഗ്രേഡൺ ഹോറെ ആണ് റസ്റ്റ് ആദ്യം രൂപകൽപ്പന ചെയ്തത്.[10][11] സെർവോ ലേഔട്ട് അല്ലെങ്കിൽ ബ്രൗസർ എഞ്ചിൻ[12], റസ്റ്റ് കംപൈലർ എന്നിവ എഴുതുമ്പോൾ ഡിസൈനർമാർ ഭാഷ പരിഷ്‌ക്കരിച്ചു. എംഐടി ലൈസൻസിനും അപ്പാച്ചെ ലൈസൻസ് 2.0 നും കീഴിൽ കംപൈലർ സൗജന്യവും ഓപ്പൺ സോഴ്‌സ് സോഫ്റ്റ്‌വെയറും ഇരട്ട-ലൈസൻസുള്ളതാണ്.

2016 മുതൽ എല്ലാ വർഷവും സ്റ്റാക്ക് ഓവർഫ്ലോ ഡവലപ്പർ സർവേയിലെ "ഏറ്റവും പ്രിയപ്പെട്ട പ്രോഗ്രാമിംഗ് ഭാഷ" ആണ് റസ്റ്റ്.[13][14][15][16]

ഡിസൈൻ തിരുത്തുക

മോസില്ലയുടെ റസ്റ്റ് ടീമിൽ നിന്നുള്ള എമിലി ഡൻഹാം എഴുതിയ റസ്റ്റിനെക്കുറിച്ചുള്ള അവതരണം നടത്തുന്നു (linux.conf.au സമ്മേളനം, ഹോബാർട്ട്, 2017).

വളരെ ഒരേസമയത്തും വളരെ സുരക്ഷിതവുമായ സിസ്റ്റങ്ങൾക്കായുള്ള ഒരു ഭാഷയാണ് റസ്റ്റ് ഉദ്ദേശിക്കുന്നത്, [17] വലിയ പ്രോഗ്രാമിംഗ്, അതായത് വലിയ സിസ്റ്റം സമഗ്രത കാത്തുസൂക്ഷിക്കുന്ന അതിരുകൾ സൃഷ്ടിക്കുകയും പരിപാലിക്കുകയും ചെയ്യുക. [18] സുരക്ഷ, മെമ്മറി ലേഔട്ടിന്റെ നിയന്ത്രണം, കൺകറൻസി എന്നിവയ്‌ക്ക് പ്രാധാന്യം നൽകുന്ന ഒരു സവിശേഷത സെറ്റിലേക്ക് ഇത് നയിച്ചു.

ഇഡ്യൂമാറ്റിക് റസ്റ്റിന്റെ പ്രകടനം തിരുത്തുക

ഇഡ്യൂമാറ്റിക് റസ്റ്റിന്റെ പ്രകടനം ഇഡ്യൂമാറ്റിക് സി++ ന്റെ പ്രകടനവുമായി താരതമ്യപ്പെടുത്താവുന്നതാണ്.[19][20]

വാക്യഘടന തിരുത്തുക

റസ്റ്റിന്റെ കോൺക്രീറ്റ് വാക്യഘടന സി, സി++ എന്നിവയ്ക്ക് സമാനമാണ്, ചുരുള ബ്രാക്കറ്റുകളാൽ വേർതിരിച്ച കോഡ് ബ്ലോക്കുകളും, കൂടാതെ, വേണമെങ്കിൽ, if, else, while,forഎന്നിങ്ങനെയുള്ള നിയന്ത്രണ ഫ്ലോ കീവേഡുകളും നിയന്ത്രിക്കുക. .എല്ലാ സി അല്ലെങ്കിൽ സി++ കീവേഡുകളും നടപ്പിലാക്കുന്നില്ല, എന്നിരുന്നാലും ചില റസ്റ്റ് ഫംഗ്ഷനുകൾ (പാറ്റേൺ പൊരുത്തപ്പെടുത്തലിനായി കീവേഡ് പൊരുത്തത്തിന്റെ ഉപയോഗം പോലുള്ളവ) ഈ ഭാഷകളിൽ വൈദഗ്ദ്ധ്യമുള്ളവർക്ക് പരിചിതമല്ല. സി, സി++ എന്നിവയുമായി ഉപരിപ്ലവമായ സാമ്യം ഉണ്ടെങ്കിലും, ആഴമേറിയ അർത്ഥത്തിൽ റസ്റ്റിന്റെ വാക്യഘടന എം‌എൽ കുടുംബ ഭാഷകളുമായും ഹാസ്‌കൽ ഭാഷയുമായും അടുത്തുനിൽക്കുന്നു. ഒരു ഫംഗ്ഷൻ ബോഡിയുടെ മിക്കവാറും എല്ലാ ഭാഗങ്ങളും ഒരു പദപ്രയോഗമാണ്, [21] ഫ്ലോ ഓപ്പറേറ്റർമാരെ പോലും നിയന്ത്രിക്കുക. ഉദാഹരണത്തിന്, സാധാരണ if പദപ്രയോഗം സിയുടെ ടെറിനറി കണ്ടീഷൻ എടുക്കുന്നു. ഒരു ഫംഗ്ഷൻ ഒരു റിട്ടേൺ എക്‌സ്‌പ്രഷനിൽ അവസാനിക്കേണ്ടതില്ല: ഈ സാഹചര്യത്തിൽ അർദ്ധവിരാമം ഒഴിവാക്കിയിട്ടുണ്ടെങ്കിൽ, ഫംഗ്ഷനിലെ അവസാന എക്‌സ്‌പ്രഷൻ റിട്ടേൺ മൂല്യം സൃഷ്ടിക്കുന്നു.

മെമ്മറി സുരക്ഷ തിരുത്തുക

റസ്റ്റ് മെമ്മറി സുരക്ഷിതമായി രൂപകൽപ്പന ചെയ്‌തിരിക്കുന്നു, മാത്രമല്ല ഇത് സുരക്ഷിത കോഡിലെ അസാധുവായ പോയിന്ററുകൾ, ഡാങ്ളിംഗ് പോയിന്ററുകൾ അല്ലെങ്കിൽ ഡാറ്റ റേസുകൾ എന്നിവ അനുവദിക്കുന്നില്ല.[22][23][24]ഒരു നിശ്ചിത ഫോം വഴി മാത്രമേ ഡാറ്റ മൂല്യങ്ങൾ സമാരംഭിക്കാൻ കഴിയൂ, ഇവയ്‌ക്കെല്ലാം അവയുടെ ഇൻപുട്ടുകൾ ഇതിനകം സമാരംഭിക്കേണ്ടതുണ്ട്.[25]ലിങ്കുചെയ്‌ത ലിസ്റ്റ് അല്ലെങ്കിൽ ബൈനറി ട്രീ ഡാറ്റാ സ്ട്രക്ചറുകൾ പോലുള്ള സാധുവായതാണോ അല്ലെങ്കിൽ NULL എന്ന് മറ്റ് ഭാഷകളിലെ ഫംഗ്ഷൻ ആവർത്തിക്കുന്നതിന്, റസ്റ്റ് കോർ ലൈബ്രറി ഒരു ഓപ്ഷൻ ടൈപ്പ് നൽകുന്നു, ഒരു പോയിന്ററിന് Someമൂല്യമുണ്ടോ അല്ലെങ്കിൽNone ആണോ എന്ന് പരിശോധിക്കാൻ ഇത് ഉപയോഗിക്കാം. ലൈഫ്ടൈം നിയന്ത്രിക്കുന്നതിനായി റസ്റ്റ് കൂട്ടിച്ചേർത്ത വാക്യഘടനയും അതിന്റെ ബോറോ പരിശോധനയിലൂടെ കംപൈലർ റീസൺസ് അവതരിപ്പിക്കുന്നു. ഈ നിയന്ത്രണങ്ങളിൽ ചിലത് സബ്വെർട്ട് സുരക്ഷിതമല്ലാത്ത കോഡ് ഭാഷയിൽ ഉള്ളunsafe കീവേഡ് ഉപയോഗിച്ച് എഴുതാം

മെമ്മറി മാനേജുമെന്റ് തിരുത്തുക

റസ്റ്റ് ഒരു ഓട്ടോമേറ്റഡ് ഗാർബേജ് ശേഖരണ സംവിധാനം ഉപയോഗിക്കുന്നില്ല. പകരം, മെമ്മറിയും മറ്റ് റിസോഴ്സുകളും മാനേജുചെയ്യുന്നത് റിസോഴ്സ് അക്വിസിഷൻ ഓപ്ഷണൽ റഫറൻസ് കൗണ്ടിംഗ് വഴിയുള്ള ഓർഗനൈസേഷൻ (RAII) കൺവെൻഷനാണ്.

അവലംബം തിരുത്തുക

  1. "Command Optimizations?". 2014-06-26. Retrieved 2014-12-10. I just added the outline of a Result library that lets you use richer error messages. It's like Either except the names are more helpful. The names are inspired by Rust's Result library.
  2. "Idris – Uniqueness Types". Retrieved 2018-11-20.
  3. Jaloyan, Georges-Axel (19 October 2017). "Safe Pointers in SPARK 2014". Retrieved 1 January 2019. {{cite journal}}: Cite journal requires |journal= (help)
  4. Lattner, Chris. "Chris Lattner's Homepage". Nondot.org. Retrieved 2019-05-14.
  5. "Rust is a systems programming language". Rust-lang.org. Retrieved 2017-07-17.
  6. Hoare, Graydon (2016-12-28). "Rust is mostly safety". Graydon2. Dreamwidth Studios. Retrieved 2019-05-13.
  7. "FAQ – The Rust Project". Rust-lang.org. Archived from the original on 2016-06-09. Retrieved 27 June 2019.
  8. "Rust vs. C++ Comparison". Retrieved 20 November 2018. Rust is syntactically similar to C++, but it provides increased speed and better memory safety
  9. Noel (2010-07-08). "The Rust Language". Lambda the Ultimate. Retrieved 2010-10-30.
  10. "Contributors to rust-lang/rust". GitHub. Retrieved 2018-10-12.
  11. Bright, Peter (2013-04-03). "Samsung teams up with Mozilla to build browser engine for multicore machines". Ars Technica. Retrieved 2013-04-04.
  12. "Stack Overflow Developer Survey 2016 Results". Stack Overflow. Retrieved 2017-03-22.
  13. "Stack Overflow Developer Survey 2017". Stack Overflow. Retrieved 2017-03-22.
  14. "Stack Overflow Developer Survey 2018". Stack Overflow. Retrieved 2018-03-13.
  15. "Stack Overflow Developer Survey 2019". Stack Overflow. Retrieved 2019-04-09.
  16. Avram, Abel (2012-08-03). "Interview on Rust, a Systems Programming Language Developed by Mozilla". InfoQ. Retrieved 2013-08-17. GH: A lot of obvious good ideas, known and loved in other languages, haven't made it into widely used systems languages ... There were a lot of good competitors in the late 1970s and early 1980s in that space, and I wanted to revive some of their ideas and give them another go, on the theory that circumstances have changed: the internet is highly concurrent and highly security-conscious, so the design-tradeoffs that always favor C and C++ (for example) have been shifting.
  17. "Debian package description: rustc".
  18. Walton, Patrick (2010-12-05). "C++ Design Goals in the Context of Rust". Retrieved 2011-01-21. It's impossible to be 'as fast as C' in all cases while remaining safe ... C++ allows all sorts of low-level tricks, mostly involving circumventing the type system, that offer practically unlimited avenues for optimization. In practice, though, C++ programmers restrict themselves to a few tools for the vast majority of the code they write, including stack-allocated variables owned by one function and passed by alias, uniquely owned objects (often used with auto_ptr or the C++0x unique_ptr), and reference counting via shared_ptr or COM. One of the goals of Rust's type system is to support these patterns exactly as C++ does, but to enforce their safe usage. In this way, the goal is to be competitive with the vast majority of idiomatic C++ in performance, while remaining memory-safe ...
  19. "How Fast Is Rust?". The Rust Programming Language FAQ. Retrieved 11 April 2019.
  20. "rust/src/grammar/parser-lalr.y". 2017-05-23. Retrieved 2017-05-23.
  21. Rosenblatt, Seth (2013-04-03). "Samsung joins Mozilla's quest for Rust". Archived from the original on 2013-04-04. Retrieved 2013-04-05. [Brendan Eich] noted that every year browsers fall victim to hacking in the annual Pwn2Own contest at the CanSecWest conference. "There's no free memory reads" in Rust, he said, but there are in C++. Those problems "lead to a lot of browser vulnerabilities" and would be solved by Rust, which is a self-compiling language.
  22. Brown, Neil (2013-04-17). "A taste of Rust". Retrieved 2013-04-25. ... Other more complex data structures could clearly be implemented to allow greater levels of sharing, while making sure the interface is composed only of owned and managed references, and thus is safe from unplanned concurrent access and from dangling pointer errors.
  23. "Data Races and Race Conditions".
  24. "The Rust Language FAQ". static.rust-lang.org. 2015. Archived from the original on 2015-04-20. Retrieved 2017-04-24.