type-hinting
Adding a type hint to a Clojure gen-class state access
I am writing a Clojure class using gen-class. I have a \"state\" field that I am trying to access in the following code:[详细]
2023-03-19 01:52 分类:问答Type hinting return value with ^ or :tag meta?
The two seem to be doing the same thing in Clojure. Which syntax is canonical? (defn a ^int [] 4) (defn b ^{:tag int} [] 4)[详细]
2023-03-15 07:00 分类:问答PHP5 what is the use case of type hiting in php
function(myCar $cars) In P开发者_JS百科HP5, type hinting is a specifying class name before object variable in a function parameters.[详细]
2023-03-13 22:55 分类:问答How can I tell PyCharm what type a parameter is expected to be?
When it comes to constructors, and assignments, and method calls, the PyCharm IDE is pretty good at analyzing my source code and figuring out what type each variable should be. I like it when it\'s ri[详细]
2023-03-12 20:30 分类:问答Can you hint an array's items type? [duplicate]
This question already has answers here: PHPDoc type hinting for array of objects? (14 answers) Closed 8 years ago.[详细]
2023-03-08 23:53 分类:问答Way to verify if variable is a valid GD image resource?
I have a class that accepts a GD image resource as one of its arguments. As far as I know, there is no way to type hint this since it is a resource and not an object. Is there a way to validate whethe[详细]
2023-03-04 19:03 分类:问答Type Hinting For Multiple Unrelated Interfaces
Is there a way in php to type hint for two different, unrelated interfaces?For example: interface errorable {[详细]
2023-02-14 09:42 分类:问答Clojure - How to check if type hints in protocols are correct?
How to chec开发者_如何学Ck if I the type hints I have put to my code are correct? It seems like even if I put wrong type hints it works without any warnings:[详细]
2023-02-09 10:38 分类:问答PHP interface implementation rejects subclasses on parameters
consider this: class A{} class B extends A{} interface I{ // expects object instanceof A function doSomething(A $a);[详细]
2023-02-06 04:50 分类:问答Why is "traditional" type-hinting not allowed in PHP?
Just discovered that type-hinting is allowed in PHP, but not for ints, strings, bools, or floats. Why does PHP not allow type hinting for types l开发者_运维问答ike integer, strings, ... ?As of PHP 7.[详细]
2023-02-06 02:14 分类:问答
加载中,请稍侯......