« first day (2687 days earlier)      last day (493 days later) » 

12:02 AM
REFRESH!
[Minesweeper] 55 Games Played. 38 Bombs Used. 7156 Moves Performed. 10 New Users
[rubberduck-vba/Rubberduck] 1 issues opened. 7 commits. 2 issues closed. 4 issue comments
 
 
1 hour later…
1:24 AM
> From a test, I could determine that if a declaration was created for the hidden interface, then bracketing the supertype name would enable the resolution to succeed. In my test, I used `ClassModuleDeclaration` to "declare" the hidden interface but that would not be a proper use of the declarations. Thus, question then become:

1) Do we want to add hidden interfaces as a declaration? For instance, we could create `HiddenTypeDeclaration` and stick those types which would then allow the resolve
 
1:41 AM
 
 
10 hours later…
11:21 AM
> > Personally I'd write
>
> ```
> set Instance = PredeclaredClass.Init(arg)
>
> should trigger the inspection warning.

This is wrong! Init is a constructor! Factory is responsible for New'ing the class and is called on the predeclared instance. Constructor is responsible for initialization and must be called on the new instance. That is the reason why we need a factory and constructor. One of them is not sufficient.
> > Personally I'd write
>
> ```
> set Instance = PredeclaredClass.Init(arg)
>
> should trigger the inspection warning.

This is wrong! Init is a constructor! Factory is responsible for New'ing the class and is called on the predeclared instance. Constructor is responsible for initialization and must be called on the new instance. That is the reason why we need a factory and constructor. One of them is not sufficient.

And you can't create a new instance without using the New operator
> > Personally I'd write
>
> ```
> set Instance = PredeclaredClass.Init(arg)
>
> should trigger the inspection warning.

This is wrong! Init is a constructor! Factory is responsible for New'ing the class and is called on the predeclared instance. Constructor is responsible for initialization and must be called on the new instance. That is the reason why we need a factory and constructor. One of them is not sufficient.

And you must use the New operator to create an instance of a class
 
11:36 AM
> Please explain why. As an example here is an example of my current useage. I haven't yet got my head around TSomething and TFactorySomething as explained in one of Mat's blogs

```
'@Description("Returns a new instance of the Lyst Class. Optionally populates the instance with the result of For Each applied to ipIterable.")
Public Function Deb(Optional ByVal ipIterable As Variant = Empty) As Lyst

Guard UsePredeclaredIdInstance, Not (Me Is Lyst), i.Location & "Deb"

If
> Please explain why. As an example here is an example of my current useage. I haven't yet got my head around TSomething and TFactorySomething as explained in one of Mat's blogs. Following feedback I now use Deb( short for debut or debutate) and ReadyToUseInstance instead of Create/Init and Self.

```
'@Description("Returns a new instance of the Lyst Class. Optionally populates the instance with the result of For Each applied to ipIterable.")
Public Function Deb(Optional ByVal ipIterable As
 
11:48 AM
> Ok, "With New" can be used instead of declaring an instance variable within the factory (Deb).

Is there an advantage of using

```vb
With New Lyst
Set Deb = .ReadyToUseInstance(ipIterable)
End With
```

over

```vb
Dim Instance as Lyst
Set Instance = New Lyst
Instance.ReadyToUseInstance(ipIterable)
```
though?
> Ok, "With New" can be used instead of declaring an instance variable within the factory (Deb).

Is there an advantage of using

```vb
With New Lyst
Set Deb = .ReadyToUseInstance(ipIterable)
End With
```

over

```vb
Dim Instance as Lyst
Set Instance = New Lyst
Instance.ReadyToUseInstance(ipIterable)
```
though?

Well, the former is cleaner in a sense, sure.
> Ok, "With New" can be used instead of declaring an instance variable within the factory (Deb).

Is there an advantage of using

```vb
With New Lyst
Set Deb = .ReadyToUseInstance(ipIterable)
End With
```

over

```vb
Dim Instance as Lyst
Set Instance = New Lyst
Instance.ReadyToUseInstance(ipIterable)
```
though?

Well, the former is cleaner in a sense, sure. And helps to avoid the missing New operator by using a different pattern.
> Ok, "With New" can be used instead of declaring an instance variable within the factory (Deb).

Is there an advantage of using

```vb
With New Lyst
Set Deb = .ReadyToUseInstance(ipIterable)
End With
```

over

```vb
Dim Instance as Lyst
Set Instance = New Lyst
Instance.ReadyToUseInstance(ipIterable)
```
though?

Well, the former is cleaner in a sense, sure. And helps to avoid the missing New operator issue by using a different pattern.
 
12:49 PM
> Linking #1229 (aye, that's an old one!)
> I suspect the methodology was used to avoid creating an instance variable. I just copied what I thought was a good idea. Nothing wrong with your version though.
 
1:27 PM
> The last comment in the linked issue is the approach we're looking at. Namely, the introduction of a @TestCase parameterized annotation that would define the literal values (string or numeric) each run would be passing as arguments to the parameterized test.
 
2:43 PM
> I just looked over this [post](https://rubberduckvba.wordpress.com/2018/04/24/factories-parameterized-object-initialization/) again . With this

```vb
Public Property Get Self() As Something
Set Self = Me
End Property

Public Function NewSomething(ByVal initialBar As Long, ByVal initialDucky As String) As Something
With New Something
.Bar = initialBar
.Ducky = initialDucky
Set NewSomething = .Self
End With
End Function
```

it is possible to
> I just looked over this [post](https://rubberduckvba.wordpress.com/2018/04/24/factories-parameterized-object-initialization/) again . With this

```vb
Public Property Get Self() As Something
Set Self = Me
End Property

Public Function NewSomething(ByVal initialBar As Long, ByVal initialDucky As String) As Something
With New Something
.Bar = initialBar
.Ducky = initialDucky
Set NewSomething = .Self
End With
End Function
```

it is possible to
 
 
1 hour later…
 
2 hours later…
 
3 hours later…
 
3 hours later…
11:47 PM
[rubberduck-vba/Rubberduck] 1427 stars vs. [decalage2/oletools] 1762 stars
 

« first day (2687 days earlier)      last day (493 days later) »