gooブログはじめました!

写真付きで日記や趣味を書くならgooブログ

Many of the newer Web-oriented programming languages

2014-03-28 14:43:47 | Led Lamps


Many of the newer Web-oriented programming languages, such as PHP and JavaScript, do not have static typing, hence they are referred to as dynamically typed languages.With dynamic typing, "there is no explicit information in the source code that describes what kind of information the program is dealing with," O'Sullivan said.In contrast, static typing requires the programmer to define the data type for each variable before that program is piled or run.Though it takes extra work to implement, static typing prevents run-time errors occurring when the wrong data type is entered into the program, either by human input or some other puter function.

"There are certain kinds of errors and crashes that can occur," if the programmer is not careful about what data is assigned to variables, O'Sullivan said.Renault CAN Clip Diagnostic Interface
"These latent errors can hide for a long time in a dynamically typed languages."
The HHVM virtual machine has a built-in type checker to ensure that all of the typed information is correct. Hack even allows the programmer to define unique data types."Syntactically, Hack is very close to PHP. We allowed it to be possible to run PHP and Hack code side-by-side so you can gradually convert your language codebase from PHP to Hack," O'Sullivan said.

Certain deprecated PHP features, however,Volvo Diagnosis Interface
are not supported in Hack, and neither are a handful of features that don't work well with static typing.Hack also es with a number of additions not found in PHP. One is Collections, a way to create arrays with more nuance than the array function offered by PHP itself, O'Sullivan said.Hack also eases the use of closures through the use of Lambda expressions. Closures, which were added to Java 8, "make it easy to succinctly write fairly plicated data transformations," O'Sullivan said.
Hack's Lambda expressions provide a way to create closures "with a fewer number of keystrokes, which is a big win for productivity," he said.Facebook has supplied a number of text editor plug-ins on the Hack website to help coders write in the language, though the pany is hoping volunteers will build a few more elaborate ones.O'Sullivan didn't reveal any specific plans to offer the Hack augmentations back to the keepers of PHP, though he did note that the pany plans to "work closely with the open-source munity," to further develop the language.

コメントを投稿