-
-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On the relationship with Hacklang #180
Comments
It is a very good point, makes much sense and we were thinking about it already. Also hacklang provides type hinting for class properties (which we solved through PHPDoc It is a future plan, with no ETA. |
👍 Alright. Naturally, you'd want to make PHP work before moving on to extending with interop stuff. However, generics and then async await seems crucial to me when interop-ing with .NET from PHP. Right now you cannot instantiate a generic class, such List. In the meantime, I'll wait with excitement for what you and the community deliver next :) |
@RobertSundstrom basically I can integrate Hack into the compiler if anyone would extend the parser with syntax for that (at https://github.com/devsense/parsers). |
@jakubmisek I'm not a PHP or Hack programmer :) But sure, I could maybe help with that. But I think that we should have a strategy for implementing these features. First, we need to know how they map to the .NET world. I think that priority #1 is understanding how Hack handles type through gradual typing. Type annotations and their effect on regular PHP code. |
@RobertSundstrom Actually the first step is to extend the parser - without any knowledge of .NET runtime or mapping Hack constructs to anything. After that, after we have the syntax tree, we can subsequently learn compiler to handle frequently used constructs (type annotations are the easiest one, we already compile type hints). The rest of constructs remain unimplemented. |
@jakubmisek OK! Then I'll just start by learning how the parser works and then add the syntax support there. |
awesome! the parser has extensive tests that should help to maintain the code working. Note there are The other way would be to enable |
Closed for inactivity. Hack language is currently not planned to be supported, however some of its features will be implemented in a future versions (not on roadmap yet, but e.g. generics )will be needed at some point. |
"Hack language is currently not planned to be supported," That makes me sad. :( At FB, there has been some interest in making Hack interop with other languages, and C# has been brought up before. |
We're just saying it's not on the immediate roadmap. If enough interest arises, we'll revisit the idea, but so far there are too many other priorities. Theoretically nothing is stopping this from happening and if see that enough devs want this, we'll definitely consider it. |
Will there be some syntactic convergence with Hack (Facebooks PHP extension)?
Because it has generics and async and that syntax could be used for interop with .NET generics and Task.
The real question is:
Unless PHP itself plans implement similar features, will you adopt at least these syntactic extensions for .NET features?
And: Would you implement Hacklang too? Gradual typing and other things that could make PHP a more or less complete CLI/.NET language.
The text was updated successfully, but these errors were encountered: