[ Поиск ] - [ Пользователи ] - [ Календарь ]
Полная Версия: язык hack
Dezigo
Как Вам язык Hack?
http://hacklang.org
Hack is a programming language for HHVM that interoperates seamlessly with PHP. Hack reconciles the fast development cycle of PHP with the discipline provided by static typing, while adding many features commonly found in other modern programming languages.

Hack provides instantaneous type checking via a local server that watches the filesystem. It typically runs in less than 200 milliseconds, making it easy to integrate into your development workflow without introducing a noticeable delay.

Пройдите урок.
http://hacklang.org/tutorial/

Это же охренено!!
Добавили типы воврата, вектора, списки и многое другое!!
Это новое поколение PHP. smile.gif
Oyeme
Действительно круто стало smile.gif
Избавит от проблем с типами и много чего добавили.
Invis1ble
О каких проблемах с типами идет речь?

_____________

Профессиональная разработка на заказ

Я на GitHub | второй профиль

Oyeme
Цитата (Invis1ble @ 29.04.2014 - 14:50)
О каких проблемах с типами идет речь?

Тип возрата функции,теперь нельзя возращять что попало(mixed type)
Zzepish
Oyeme
и чем хорошо?
Invis1ble
Цитата (Oyeme @ 29.04.2014 - 18:57)
Цитата (Invis1ble @ 29.04.2014 - 14:50)
О каких проблемах с типами идет речь?

Тип возрата функции,теперь нельзя возращять что попало(mixed type)

так это вопрос культуры разработки, можно просто не говнокодить и все будет норм smile.gif

_____________

Профессиональная разработка на заказ

Я на GitHub | второй профиль

Invis1ble
так то задумка выглядит прикольно, но это уже не php smile.gif

_____________

Профессиональная разработка на заказ

Я на GitHub | второй профиль

Oyeme
Цитата (Invis1ble @ 29.04.2014 - 15:05)
так то задумка выглядит прикольно, но это уже не php smile.gif

Это лучше,и да Вы правы это помогает избежать проблем в дальнейшем и быть говно-кодером. smile.gif

В этом языке так сказать очень много чего интерестного добавленно,как например Collection smile.gif

http://docs.hhvm.com/manual/en/hack.collections.php

Zzepish

http://docs.hhvm.com/manual/en/hack.annotations.why.php

Цитата
Normally dynamically typed languages allow variables to take on any type representation and allow this type representation to be changed on-the-fly. So, in PHP, a variable $x can be assigned to an int and then, down the line, be assigned to a string ... all in the same local scope. In other words, not only is the value of a variable mutable, the type of a variable is mutable. This ability allows for rapid prototyping, more concise code, and a lot of flexibility. Dynamic typing also comes with a cost. Errors are only caught at runtime. There is no compile-time analysis for code optimization. (Virtual machines like HHVM can mitigate the optimization disadvantage of a dynamically typed language by providing an intermediate translation step before runtime, the time which can be used for optimizations.) Bugs can go undetected for years and rear their ugly head when, for example, a call to a method with an unexpected parameter type is made.

"Wait a second! Facebook.com, with its billion+ users, is written with tens of millions of lines of PHP! A dynamic language worked well for Facebook."

Yes, Facebook has done quite well with dynamically typed PHP. However, it is possible to bring some statically typed language features to PHP without affecting functionality and performance. With statically typed languages, errors can be caught before runtime. Code becomes more readable and self-explaining. The likelihood of the rogue "calling a method with an unexpected parameter type" bug becomes very small as these are caught before execution.

Hack helps bridge the gap between dynamically and statically typed languages by providing features normally seen in statically typed languages to PHP. A primary goal of Hack was to bring these features but remain as compatible as possible with current PHP codebases. Type annotations is a big step toward accomplishing this goal.
Zzepish
Oyeme
мб так и есть!
Dezigo
Я уже создавал тему на этом форуме, что мне не нравится в PHP.
Типы возврата, самое главная причина.
Особенно это http://docs.hhvm.com/manual/en/hack.generics.mixedcompat.php
sergeiss
Цитата (Dezigo @ 28.04.2014 - 18:21)
Это новое поколение PHP.

Посмотрим smile.gif Если будет польза, то почему бы и нет?

_____________
* Хэлп по PHP
* Описалово по JavaScript
* Хэлп и СУБД для PostgreSQL

* Обучаю PHP, JS, вёрстке. Интерактивно и качественно. За разумные деньги.

* "накапливаю умение телепатии" (С) и "гуглю за ваш счет" (С)

user posted image
AllesKlar
Не, круто.
Я наконец-то перестану слюной брызжать и нервно тикать глазом, при виде, как дату пихают в строку.

_____________
[продано копирайтерам]
Быстрый ответ:

 Графические смайлики |  Показывать подпись
Здесь расположена полная версия этой страницы.
Invision Power Board © 2001-2025 Invision Power Services, Inc.