Records with a single attribute - Is it considered bad practice?

Records with a single attribute - Is it considered bad practice?

  

Hi,

In the project I'm currently working on, almost every variable and input/output parameter is declared as a Record with a single attribute whose type is some Structure. This looks kind of strange to me, since the OutSystems documentation states that records should be used when you need a compound data type but don't want to create a new structure for it.

It also makes comparions, assigns and other expressions unnecessarily convoluted, since instead of simply using "Variable.StructureAttribute", you have to use "Variable.RecordAttribute.StructureAttribute".

So, what do you guys think? Am I wrong in considering that using Records the way I described looks like bad practice?

Solution

It could be because it used to work that way.

So in the past it was the only way to go, but since 9(?) we could ditch the record when possible.


So, yes it *could* be considered bad practice now, but not when you started with 5.1 :)


Solution

J. wrote:

It could be because it used to work that way.

So in the past it was the only way to go, but since 9(?) we could ditch the record when possible.


So, yes it *could* be considered bad practice now, but not when you started with 5.1 :)


Thanks for your input J. I think you nailed it, since the app is pretty ancient.

Here's a comment I found in the theme's CSS:

/* Inserted in the upgrade to 5.0.0.0: */