2 ms·
It looks like Facebook had your exact problem; you want Hack: https://hacklang.org https://hacklang.org It's based on PHP, but adds: Expressive type system w
by Zarel 7y ago
It looks like Facebook had your exact problem; you want Hack:
https://hacklang.org https://hacklang.org
It's based on PHP, but adds:
Expressive type system with generics:
https://docs.hhvm.com/hack/types/generic-types https://docs.hhvm.com/hack/types/generic-types
Specialized collections: vec, dict, keyset
https://docs.hhvm.com/hack/types/arrays https://docs.hhvm.com/hack/types/arrays
Templating solution similar to JSX: XHP
https://docs.hhvm.com/hack/XHP/some-basics https://docs.hhvm.com/hack/XHP/some-basics
- DCoder 7y agoI'm aware of Hack and it's quite nice, but I can't use it because a) my coworkers are … less open to new ideas … and will rightfully resist a "whole new language", whereas mgmt will see it as an attempt at "job security", and b) the biggest use-case for generics is third-party libraries (e.g. [0], [1], [2], [3]) which will never add support if this is not a core language feature. [0]: https://github.com/doctrine/collections https://github.com/doctrine/collections [1]: https://github.com/schmittjoh/php-option https://github.com/schmittjoh/php-option [2]: https://github.com/schmittjoh/php-collection https://github.com/schmittjoh/php-collection [3]: https://github.com/widmogrod/php-functional https://github.com/widmogrod/php-functional