Thanks Peter,
Yeah, I didn't find that reference before. It would have saved me a couple
hours. I found something similar in a few places, but it only had the
primitive types. It missed the class specific element type.
On Tuesday, October 10, 2017 at 3:22:38 AM UTC-7, Peter Hull wrote:
>
> I act
I actually preferred your solution, pericles, because it doesn't require
memorising the "[L...;" syntax, and works if you don't know the class at
compile time. By the way you can use make-array to create a zero size array
which might be (ever so slightly) more efficient.
For reference (apologie
What Alex suggested is probably the best approach here. Note: there's a typo in
my message, the name of the class needs to be as Alex says for the type hint
too, i.e. the L and ; are essential for this to work.
> On 9 Oct 2017, at 18:31, pericles macedo wrote:
>
> Hey Gary, thanks for the help
Hey Gary, thanks for the help
I'm not sure if a type hint would work in this case, as the attribute
expect a class literal, and not a variable of that specific class. Thanks
for the example though, I didn't know that was a valid type hint.
About what I'm trying to do, I'm using a gitlab api gem
Thanks Alex :)
Yes, that works better
On Monday, October 9, 2017 at 9:21:24 AM UTC-7, Alex Miller wrote:
>
> (Class/forName "[Lorg.gitlab.api.models.GitlabProject;")
>
>
> On Monday, October 9, 2017 at 10:38:37 AM UTC-5, pericles macedo wrote:
>>
>> Hey Guys,
>> I wanted to know if there is a bett
(Class/forName "[Lorg.gitlab.api.models.GitlabProject;")
On Monday, October 9, 2017 at 10:38:37 AM UTC-5, pericles macedo wrote:
>
> Hey Guys,
> I wanted to know if there is a better way to get to the same result as
> `GitlabProject[].class`
> after some digging around, I got to this array of cl
You can generally use ^"[fully.qualified.ClassName" as the type hint, if that's
what you're trying to do. I'm not quite sure of the benefits of typing an array
when it's not a primitive one, though.
What are you trying to accomplish, if we zoom back a little bit? Maybe there's
a better way to d
Hey Guys,
I wanted to know if there is a better way to get to the same result as
`GitlabProject[].class`
after some digging around, I got to this array of class definition by doing
something like `(class (make-array GitlabProject 1))`. But I don't know if
there is a better way to get to this sam